Skip to content

Commit

Permalink
Merge pull request #43 from flaiker/0dot2
Browse files Browse the repository at this point in the history
0.2.0
  • Loading branch information
fabianlupa authored Oct 7, 2017
2 parents 238ee6e + cb07a40 commit 9cb0e3e
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 8 deletions.
18 changes: 18 additions & 0 deletions abapdoc/zalog/classes/zcl_alog_adt_logger.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><title>Class ZCL_ALOG_ADT_LOGGER</title><link rel="stylesheet" href="../../../htmldesign/stylesheet.css" type="text/css"></head><body><div id="header"><div id="navigationMenu"><a href="#attributes">Attributes</a> | <a href="#methods">Methods</a></div></div><div id="content"><h2>Class <span class="identifier objectName">ZCL_ALOG_ADT_LOGGER</span></h2><p>public inheriting from ZCL_ALOG_MSG_LOGGER_BASE create public</p><h4>Documentation</h4><span class="abapDocComment"> Logger for ADT console applications
<p>
This logger dynamically uses the <em>OUT</em>-parameter of <em>IF_OO_ADT_CLASSRUN~MAIN</em> for
log output. Static usage is intentionally avoided because the interface is only available as of
ABAP 7.51.
</p>
Unfortunately there are some limitations if you expect Java-style console output. These seem to
be 'by design':
<ul>
<li>Logged output is only transmitted after the <em>main</em>-method has finished
execution</li>
<li>Logged output is not transmitted at all if the application fails with a short dump</li>
<li>Log entries are always separated by an empty line</li>
</ul></span><h4 id="attributes">Attributes</h4><table><thead><tr><th>Visibility and Level</th><th>Name</th><th>Documentation</th></tr></thead><tr ><td>private instance</td><td><span class="identifier fieldName">mi_console_adapter</span> type ref to LCL_ADAPTER </td><td>&#160;</td></tr></table><h4 id="methods">Methods</h4><table><thead><tr><th>Visibility and Level</th><th>Name</th><th>Documentation</th></tr></thead><tr ><td>public instance</td><td><table class="methodSignature"><tr><td colspan="3"><span class="identifier methodName">constructor</span> </td></tr><tr><td>importing</td><td><span class="identifier parameterName">io_out</span></td><td>type ref to OBJECT</td></tr><tr><td>raising</td><td colspan="2"><span class="identifier exceptionName">zcx_alog_argument_null</span></td></tr><tr><td>raising</td><td colspan="2"><span class="identifier exceptionName">zcx_alog_illegal_argument</span></td></tr></table></td><td><span class="abapDocComment"> </span><h5>Parameters</h5><table class="methodParametersDocumentation"><tr ><td><span class="identifier parameterName">io_out</span></td><td><span class="abapDocComment"> Reference to <em>IF_OO_ADT_INTRNL_CLASSRUN</em> as found in
<em>IF_OO_ADT_CLASSRUN~MAIN</em>-OUT
</span></td></tr></table><h5>Class-based Exceptions</h5><table class="exceptions"><tr ><td><span class="identifier exceptionName">zcx_alog_argument_null</span></td><td><span class="abapDocComment"> <em>io_out</em> cannot be null
</span></td></tr><tr ><td><span class="identifier exceptionName">zcx_alog_illegal_argument</span></td><td><span class="abapDocComment"> <em>io_out</em> does not implement
<em>IF_OO_ADT_INTRNL_CLASSRUN</em></span></td></tr></table></td></tr><tr ><td>protected instance</td><td><span class="identifier methodName">entry_internal</span> redefinition</td><td>&#160;</td></tr><tr ><td>private instance</td><td><table class="methodSignature"><tr><td colspan="3"><span class="identifier methodName">format_entry</span> </td></tr><tr><td>importing</td><td><span class="identifier parameterName">iv_text</span></td><td>type CSEQUENCE</td></tr><tr><td></td><td><span class="identifier parameterName">io_type</span></td><td>type ref to ZCL_ALOG_ENTRY_TYPE</td></tr><tr><td>returning</td><td>value(<span class="identifier parameterName">rv_formatted</span>)</td><td>type STRING</td></tr></table></td><td>&#160;</td></tr></table></div></body></html>
2 changes: 1 addition & 1 deletion abapdoc/zalog/classes/zcl_alog_bal_logger.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
</span></td></tr></table><h5>Class-based Exceptions</h5><table class="exceptions"><tr ><td><span class="identifier exceptionName">zcx_alog_bal_error</span></td><td><span class="abapDocComment"> BAL error</span></td></tr></table></td></tr><tr ><td>public instance</td><td><table class="methodSignature"><tr><td colspan="3"><span class="identifier methodName">show_log_entries</span> </td></tr><tr><td>importing</td><td><span class="identifier parameterName">is_profile</span></td><td>type BAL_S_PROF optional</td></tr><tr><td></td><td><span class="identifier parameterName">iv_amodal</span></td><td>type ABAP_BOOL optional</td></tr><tr><td>raising</td><td colspan="2"><span class="identifier exceptionName">zcx_alog_bal_error</span></td></tr></table></td><td><span class="abapDocComment"> Show log entries
</span><h5>Parameters</h5><table class="methodParametersDocumentation"><tr ><td><span class="identifier parameterName">is_profile</span></td><td><span class="abapDocComment"> Display profile
</span></td></tr><tr ><td><span class="identifier parameterName">iv_amodal</span></td><td><span class="abapDocComment"> Amodal dialog
</span></td></tr></table><h5>Class-based Exceptions</h5><table class="exceptions"><tr ><td><span class="identifier exceptionName">zcx_alog_bal_error</span></td><td><span class="abapDocComment"> BAL error</span></td></tr></table></td></tr><tr ><td>public instance</td><td><span class="identifier methodName">zif_alog_logger~exception</span> redefinition</td><td>&#160;</td></tr><tr ><td>protected instance</td><td><span class="identifier methodName">entry_internal</span> redefinition</td><td>&#160;</td></tr><tr ><td>protected instance</td><td><span class="identifier methodName">entry_msg_internal</span> redefinition</td><td>&#160;</td></tr></table></div></body></html>
</span></td></tr></table><h5>Class-based Exceptions</h5><table class="exceptions"><tr ><td><span class="identifier exceptionName">zcx_alog_bal_error</span></td><td><span class="abapDocComment"> BAL error</span></td></tr></table></td></tr><tr ><td>protected instance</td><td><span class="identifier methodName">entry_internal</span> redefinition</td><td>&#160;</td></tr><tr ><td>protected instance</td><td><span class="identifier methodName">entry_msg_internal</span> redefinition</td><td>&#160;</td></tr></table></div></body></html>
16 changes: 16 additions & 0 deletions abapdoc/zalog/classes/zcl_alog_file_logger.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><title>Class ZCL_ALOG_FILE_LOGGER</title><link rel="stylesheet" href="../../../htmldesign/stylesheet.css" type="text/css"></head><body><div id="header"><div id="navigationMenu"><a href="#attributes">Attributes</a> | <a href="#methods">Methods</a></div></div><div id="content"><h2>Class <span class="identifier objectName">ZCL_ALOG_FILE_LOGGER</span></h2><p>public inheriting from ZCL_ALOG_MSG_LOGGER_BASE create public</p><h4>Documentation</h4><span class="abapDocComment"> File logger
<p>
Allow logging to a file on the application server. The file handle will be opened and closed
for each logged message. The file will be created if it does not exist. If it does exists the new
entries will be appended. Logical paths are supported.
</p></span><h4 id="attributes">Attributes</h4><table><thead><tr><th>Visibility and Level</th><th>Name</th><th>Documentation</th></tr></thead><tr ><td>private instance</td><td><span class="identifier fieldName">mv_path</span> type STRING </td><td>&#160;</td></tr></table><h4 id="methods">Methods</h4><table><thead><tr><th>Visibility and Level</th><th>Name</th><th>Documentation</th></tr></thead><tr ><td>public static</td><td><table class="methodSignature"><tr><td colspan="3"><span class="identifier methodName">from_logical_path</span> </td></tr><tr><td>importing</td><td><span class="identifier parameterName">iv_logpath</span></td><td>type PATHINTERN</td></tr><tr><td></td><td><span class="identifier parameterName">iv_filename</span></td><td>type STRING</td></tr><tr><td>returning</td><td>value(<span class="identifier parameterName">ro_logger</span>)</td><td>type ref to ZCL_ALOG_FILE_LOGGER</td></tr><tr><td>raising</td><td colspan="2"><span class="identifier exceptionName">zcx_alog_illegal_argument</span></td></tr></table></td><td><span class="abapDocComment"> Get an instance using a logical path
</span><h5>Parameters</h5><table class="methodParametersDocumentation"><tr ><td><span class="identifier parameterName">iv_logpath</span></td><td><span class="abapDocComment"> Logical path name
</span></td></tr><tr ><td><span class="identifier parameterName">iv_filename</span></td><td><span class="abapDocComment"> File name
</span></td></tr><tr ><td><span class="identifier parameterName">ro_logger</span></td><td><span class="abapDocComment"> Logger instance
</span></td></tr></table><h5>Class-based Exceptions</h5><table class="exceptions"><tr ><td><span class="identifier exceptionName">zcx_alog_illegal_argument</span></td><td><span class="abapDocComment"> Logical path cannot be used</span></td></tr></table></td></tr><tr ><td>public instance</td><td><table class="methodSignature"><tr><td colspan="3"><span class="identifier methodName">constructor</span> </td></tr><tr><td>importing</td><td><span class="identifier parameterName">iv_path</span></td><td>type CSEQUENCE</td></tr></table></td><td><span class="abapDocComment"> </span><h5>Parameters</h5><table class="methodParametersDocumentation"><tr ><td><span class="identifier parameterName">iv_path</span></td><td><span class="abapDocComment"> Physical file path on application server</span></td></tr></table></td></tr><tr ><td>protected instance</td><td><span class="identifier methodName">entry_internal</span> redefinition</td><td>&#160;</td></tr><tr ><td>protected instance</td><td><table class="methodSignature"><tr><td colspan="3"><span class="identifier methodName">get_formatted_text</span> </td></tr><tr><td>importing</td><td><span class="identifier parameterName">iv_text</span></td><td>type CSEQUENCE</td></tr><tr><td></td><td><span class="identifier parameterName">io_type</span></td><td>type ref to ZCL_ALOG_ENTRY_TYPE</td></tr><tr><td>returning</td><td>value(<span class="identifier parameterName">rv_formatted_text</span>)</td><td>type STRING</td></tr></table></td><td><span class="abapDocComment"> Get a formatted log message
<p>
Override this method in a subclass for custom formatting.
</p>
</span><h5>Parameters</h5><table class="methodParametersDocumentation"><tr ><td><span class="identifier parameterName">iv_text</span></td><td><span class="abapDocComment"> Message text
</span></td></tr><tr ><td><span class="identifier parameterName">io_type</span></td><td><span class="abapDocComment"> Message type
</span></td></tr><tr ><td><span class="identifier parameterName">rv_formatted_text</span></td><td><span class="abapDocComment"> Formatted text</span></td></tr></table></td></tr></table></div></body></html>
4 changes: 2 additions & 2 deletions abapdoc/zalog/classes/zcl_alog_logger_base.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><title>Class ZCL_ALOG_LOGGER_BASE</title><link rel="stylesheet" href="../../../htmldesign/stylesheet.css" type="text/css"></head><body><div id="header"><div id="navigationMenu"><a href="#interfaces">Interfaces</a> | <a href="#aliases">Aliases</a> | <a href="#attributes">Attributes</a> | <a href="#methods">Methods</a></div></div><div id="content"><h2>Class <span class="identifier objectName">ZCL_ALOG_LOGGER_BASE</span></h2><p>public abstract create public</p><h4>Documentation</h4><span class="abapDocComment"> Logger base class
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><title>Class ZCL_ALOG_LOGGER_BASE</title><link rel="stylesheet" href="../../../htmldesign/stylesheet.css" type="text/css"></head><body><div id="header"><div id="navigationMenu"><a href="#interfaces">Interfaces</a> | <a href="#attributes">Attributes</a> | <a href="#methods">Methods</a></div></div><div id="content"><h2>Class <span class="identifier objectName">ZCL_ALOG_LOGGER_BASE</span></h2><p>public abstract create public</p><h4>Documentation</h4><span class="abapDocComment"> Logger base class
<p>
Inherit from this class and implement <em>entry_internal</em> for the logging logic.
</p></span><h4 id="interfaces">Interfaces</h4> <span class="identifier interfaceName">zif_alog_attachable</span><br/><span class="identifier interfaceName">zif_alog_logger</span> final methods ENTRY<br/><h4 id="aliases">Aliases</h4><table><thead><tr><th>Visibility and Level</th><th>Alias</th><th>Component</th></tr></thead><tr><td>public</td><td><strong>attach</strong></td><td>ZIF_ALOG_ATTACHABLE~ATTACH</td></tr><tr><td>public</td><td><strong>debug</strong></td><td>ZIF_ALOG_LOGGER~DEBUG</td></tr><tr><td>public</td><td><strong>detach</strong></td><td>ZIF_ALOG_ATTACHABLE~DETACH</td></tr><tr><td>public</td><td><strong>entry</strong></td><td>ZIF_ALOG_LOGGER~ENTRY</td></tr><tr><td>public</td><td><strong>error</strong></td><td>ZIF_ALOG_LOGGER~ERROR</td></tr><tr><td>public</td><td><strong>exception</strong></td><td>ZIF_ALOG_LOGGER~EXCEPTION</td></tr><tr><td>public</td><td><strong>info</strong></td><td>ZIF_ALOG_LOGGER~INFO</td></tr><tr><td>public</td><td><strong>warning</strong></td><td>ZIF_ALOG_LOGGER~WARNING</td></tr></table><h4 id="attributes">Attributes</h4><table><thead><tr><th>Visibility and Level</th><th>Name</th><th>Documentation</th></tr></thead><tr ><td>protected instance</td><td><span class="identifier fieldName">mt_attached_loggers</span> TYPE HASHED TABLE OF REF TO zif_alog_logger WITH UNIQUE KEY table_line </td><td>&#160;</td></tr><tr ><td>private instance</td><td><span class="identifier fieldName">mo_minimal_log_level</span> type ref to ZCL_ALOG_ENTRY_TYPE </td><td>&#160;</td></tr></table><h4 id="methods">Methods</h4><table><thead><tr><th>Visibility and Level</th><th>Name</th><th>Documentation</th></tr></thead><tr ><td>public instance</td><td><span class="identifier methodName">constructor</span> </td><td>&#160;</td></tr><tr ><td>public instance</td><td><table class="methodSignature"><tr><td colspan="3"><span class="identifier methodName">get_minimal_log_level</span> </td></tr><tr><td>returning</td><td>value(<span class="identifier parameterName">ro_type</span>)</td><td>type ref to ZCL_ALOG_ENTRY_TYPE</td></tr></table></td><td><span class="abapDocComment"> Gets the minimal log level
</p></span><h4 id="interfaces">Interfaces</h4> <span class="identifier interfaceName">zif_alog_attachable</span><br/><span class="identifier interfaceName">zif_alog_logger</span> final methods ENTRY<br/><h4 id="attributes">Attributes</h4><table><thead><tr><th>Visibility and Level</th><th>Name</th><th>Documentation</th></tr></thead><tr ><td>protected instance</td><td><span class="identifier fieldName">mt_attached_loggers</span> TYPE HASHED TABLE OF REF TO zif_alog_logger WITH UNIQUE KEY table_line </td><td>&#160;</td></tr><tr ><td>private instance</td><td><span class="identifier fieldName">mo_minimal_log_level</span> type ref to ZCL_ALOG_ENTRY_TYPE </td><td>&#160;</td></tr></table><h4 id="methods">Methods</h4><table><thead><tr><th>Visibility and Level</th><th>Name</th><th>Documentation</th></tr></thead><tr ><td>public instance</td><td><span class="identifier methodName">constructor</span> </td><td>&#160;</td></tr><tr ><td>public instance</td><td><table class="methodSignature"><tr><td colspan="3"><span class="identifier methodName">get_minimal_log_level</span> </td></tr><tr><td>returning</td><td>value(<span class="identifier parameterName">ro_type</span>)</td><td>type ref to ZCL_ALOG_ENTRY_TYPE</td></tr></table></td><td><span class="abapDocComment"> Gets the minimal log level
</span><h5>Parameters</h5><table class="methodParametersDocumentation"><tr ><td><span class="identifier parameterName">ro_type</span></td><td><span class="abapDocComment"> Entry type with the current minimal priority</span></td></tr></table></td></tr><tr ><td>public instance</td><td><table class="methodSignature"><tr><td colspan="3"><span class="identifier methodName">set_minimal_log_level</span> </td></tr><tr><td>importing</td><td><span class="identifier parameterName">io_type</span></td><td>type ref to ZCL_ALOG_ENTRY_TYPE</td></tr><tr><td>raising</td><td colspan="2"><span class="identifier exceptionName">zcx_alog_argument_null</span></td></tr></table></td><td><span class="abapDocComment"> Sets the minimal log level
<p>
If a new log entry's entry type does not have at least the priority of the entry type set
Expand Down
Loading

0 comments on commit 9cb0e3e

Please sign in to comment.