PackagePackagetypeA library you install and call yourself.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

abap-log

A logging library for ABAP with one logger interface in front of several targets, from the Application Log and the job log to database tables, files and the Eclipse console.

One interface, zif_alog_logger, sits in front of every logger, so a class can take its logger as a dependency and logging actions stay decoupled from application logic. The loggers behind it write to an internal table, the Application Log (BC-SRV-BAL), the job log through MESSAGE statements, the SAP GUI progress indicator, custom database tables, text files on the application server and the Eclipse console, and each accepts an inline string or a message-class message. It installs through abapGit into a recommended package ZALOG, and the application server must support at least ABAP 740, for the newer syntax the library uses throughout.

Facts

Last pushLicenceMIT

Where it sits

Lives in
Provides
LoggingABAPLoggingcapabilitySeeing what a running service did, in a form something can read afterwards — levels, a formatter that suits a laptop and one that suits a log service.
Requires
abapGitabapGitartifactInstalls the repository into the ABAP system; the README gives abapGit as the install method.

Who is behind it

Fabian LupaFabian LupaPersonMaintains this
In the atlas: maintains 1, contributes to 7
@fabianlupa
maintainerLars HvamPersonContributes to this
In the atlas: maintains 13, contributes to 92, wrote 1
@larshp
PCFPersonContributes to this
In the atlas: contributes to 4
@pcf0
2 contributors

Before choosing this

Signals

ActivityQuietNo published releases; repository quiet for 36 months

It publishes no releases, and its repository has been quiet for at least 24 full months. This may be normal for stable software; check whether its current state still fits your use.

What it declares

Every artifact

Type
Package
Origin
Independently maintained

As a package

Where it runs
Inside its host
Distributed through
abapGit

Connections2

README

quoted from fabianlupa/abap-log under MIT, read
fabianlupa/abap-log/README.mdOn GitHub

abap-log Build Status ABAP Doc License: MIT

Logging library for ABAP

Overview

abap-log is a library to provide various ways of logging messages in ABAP. The goal is to have a common interface for logger objects so that dependency injection can be used and logging-actions can be decoupled from application logic. Inline string log messages as well as message-class-based messages are supported.

Supported targets
  • Internal table
  • Application log (BC-SRV-BAL)
  • MESSAGE-statements for batch processing (job log)
  • SAP GUI progress indicator
  • Custom database tables
  • Log text files on the application server
  • Eclipse console (using IF_OO_ADT_CLASSRUN)
Examples

Example programs for each logger can be found in the package ZALOG_EXAMPLE.

Console logging in ABAP 7.51

Internal table logging

REPORT zalog_example.

DATA(go_logger) = NEW zcl_alog_itab_logger( ).

go_logger->info( `Hello world.` ) ##NO_TEXT.
go_logger->warning( `Hello darkness my old friend.` ) ##NO_TEXT.
go_logger->error( `Ive come to talk with you again.` ) ##NO_TEXT.
go_logger->debug( `BEEP BOOP` ) ##NO_TEXT.
go_logger->exception( NEW zcx_alog_argument_null( ) ).

MESSAGE s000(zalog) WITH 'Hello from message class' INTO DATA(gv_dummy) ##NEEDED ##NO_TEXT.
go_logger->info_msg( ).

go_logger->warning_msg(
  iv_msgid = 'ZALOG'
  iv_msgno = '001'
  iv_msgv1 = 'Hello from message class'
  iv_msgv2 = 'without where used list support...'
) ##NO_TEXT.

TRY.
    go_logger->display_as_alv( ).
  CATCH cx_salv_msg INTO DATA(gx_ex).
    MESSAGE gx_ex TYPE 'E'.
ENDTRY.

Java style logging

CLASS lcl_class_with_logging DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS:
      class_constructor.
    METHODS:
      run.
  PRIVATE SECTION.
    CLASS-DATA:
      gi_logger TYPE REF TO zif_alog_logger.
ENDCLASS.

CLASS lcl_class_with_logging IMPLEMENTATION.
  METHOD class_constructor.
    DATA: lo_dummy TYPE REF TO lcl_class_with_logging ##NEEDED.
    gi_logger = zcl_alog_static_logger=>get_logger_for_any( lo_dummy ).
  ENDMETHOD.

  METHOD run.
    gi_logger->info( `Info message` ) ##NO_TEXT.
    gi_logger->warning( `WARNING` ) ##NO_TEXT.
  ENDMETHOD.
ENDCLASS.
API and documentation

Library documentation is done using ABAP Doc and can be found here as deployed HTML. It can also be viewed in eclipse in the ABAP Element Info view (F2).

Class diagram

Installation

To use this library at least ABAP 740 must be supported by the application server. The reason for this is mostly the new syntax which is heavily used.

  • Clone the repository via abapGit
  • Recommended target package: ZALOG

Development

Feel free to contribute using pull requests or issues for feature requests and bug reports. This project has been entirely developed in the ABAP Development Tools for eclipse, including ABAP Doc documentation (which is automatically deployed to GitHub pages) and class based exceptions (these cannot be fully edited in SE24 (!)). Using eclipse is therefore highly recommended.

License

MIT License Copyright (c) 2017 Fabian Lupa

MIT, read

History

Latest

v0.2.0prerelease

  1. v0.1.0prerelease

Logging
  1. ABAP-LoggerLogging library for ABAP over the Application Logfrom ABAP
  2. abap-log-exporterExports Business Application Log entries to Graylog or Lokifrom ABAP
  3. ABAP-PRCFramework for multi-step ABAP processes with monitoringfrom ABAP
  4. SAP Application Logging service for SAP BTPCollects Cloud Foundry or Kyma logs into a searchable Kibanafrom BTP/BAIP
  5. SAP Cloud LoggingOpenSearch-based store for logs, metrics and tracesfrom BTP/BAIP
  6. com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versionsfrom CAP
  7. @cap-js/audit-loggingCAP integration with the SAP Audit Log servicefrom CAP
  8. ABAP_LOGGINGObject-oriented wrapper around the Business Application Logfrom ABAP
  9. abap-cloud-loggerChainable logger for ABAP Cloud around CL_BALI_LOGfrom ABAP
  10. abap-fm-loggerLogger storing RFC function module call parameters as JSONfrom ABAP
  11. openui5-error-collectorUI5 library collecting an app's JavaScript errorsfrom UI5
  12. open-abap-balApplication logging for ABAP transpiled to JavaScript on Node.jsfrom ABAP
  13. @openui5/sap.ui.coreFramework core: module loader, MVC runtime, binding, routing, themingfrom UI5
  14. abap-fluentdFluentd client in ABAP for sending log lines to a collectorfrom ABAP
  15. @saptools/cf-logsLog fetcher and parser for one Cloud Foundry appfrom BTP/BAIP
  16. @saptools/cf-tailMerged log tail of every started app in a Cloud Foundry spacefrom BTP/BAIP
  17. sap-usi-logging-apiObject-oriented wrapper around SAP's Application Log (SLG1)from ABAP
  18. srbjsloggerA browser JavaScript logger whose log, warn and error calls write prominent output to the console, loaded into a UI5 app through index.html or the manifest's resources.from UI5
  19. abap-message-loggerMessage logger for ABAP Cloud that saves to the Application Logfrom ABAP

Details

Sources3
dotabapdiscovered herechecked
github.com/fabianlupa/abap-logtree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viadotabap
first seen in the atlas
ecosystem and domainabap, operations-and-runtime
abaplint
issues under its own abaplint configuration20
lines3,867
statements2,360
objects43
files79
analysed, master
abaplint version2.120.84
Flavors1
Standard ABAP
“To use this library at least ABAP 740 must be supported by the application server.” — fabianlupa/abap-log — README, Installationchecked
Contributors2

From the repository’s contributor list, .

History in the atlas1
  1. First seen.
For your agent
Ref
artifact:fabianlupa-abap-log
JSON
/artifacts/fabianlupa-abap-log.json
MCP
Connecting an agent