Editing
Loggifier.unkrig.de / Tools / Command line tool
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Running the LOGGIFIER command line tool with the '<code>-help</code>' option explains its usage: Implants logging code into Java class files, and also into class files in directory trees, ZIP format files (.zip, .jar, .war, .ear, ...) and nested ZIP format files (e.g. .war in .ear). Usage: java de.unkrig.loggifier.Main [ <option> ] ... <file-or-dir> Transforms the given <file-or-dir> in-place. java de.unkrig.loggifier.Main [ <option> ] ... <file-or-dir> ... <dir> Transforms the given <file-or-dir>s into files-and-dirs with the same names in <dir>. java de.unkrig.loggifier.Main [ <option> ] ... <file-or-dir> <file-or-new-dir> Transforms the given <file-or-dir> into <file-or-new-dir>. Valid options: -help Shows this text. -keep Keep copies of original files (iff transforming in-place). -selector <glob> Loggify only classes matching the <glob>. -logging-system <id> Style of the logging code to inject. <id> is 'jre14', 'log4j', 'log4j2' or 'slf4j'. The default is to guess, based on the classes on the classpath. -rule <rule> Add the given loggification rule (format see below). -nowarn -quiet -verbose -debug -log <level>:<logger>:<handler>:<formatter>:<format> Configure the log output of this command line tool. The loggification rule format is as follows: <action>[,<action>]...=<level>[:<expression>] <action>: One of [ALOAD, ARITH, ASTORE, CAST, CATCH, CLINIT, CONST, CONVERT, ENTRY, GET, INVOKE, INSTANCEOF, LENGTH, LOAD, NEW, PUT, RESULT, RETURN, STORE, SWITCH, THROW]. <level>: One of [OFF SEVERE WARNING INFO CONFIG FINE FINER FINEST]. <expression>: E.g. '(<eq> || <eq>) && !<eq>', where <eq>: '<var> == <glob>', where <var>: is one of [action source classAccess class methodAccess method line type classAndField variable]. For actions [CAST INSTANCEOF NEW] also 'type'. For actions [GET PUT] also 'classAndField'. For actions [LOAD STORE] also 'name'. <glob>: is a 'glob pattern' in single quotes like '*main*'. The exit status is 1 iff errors occurred during loggification.
Summary:
Please note that all contributions to unkrig.de may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Unkrig.de:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help
Tools
What links here
Related changes
Special pages
Page information