AutoHotkey-V2 / log4ahk

Logging for AutoHotkey

Home Page:https://autohotkey-v2.github.io/log4ahk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

log4ahk AutoHotkey2

This library uses AutoHotkey Version 2. (Tested with AHK v2.0-a100-52515e2 x64 Unicode)

Description

Simple logging with AutoHotkey - supporting some features as provided in log4j or log4Perl

Usage

Include log4ahk.ahk from the lib folder into your project using standard AutoHotkey-include methods.

#include <log4ahk.ahk>

; Initialize the logger
logger := new log4ahk()
; Set the appenders to be logged to: STDOUT
logger.appenders.push(new logger.appenderstdout())
; Set the layout for the messages
logger.layout.required := "[%V] #%M# %m"
; Choose the desired loglevel
logger.loglevel.required := logger.loglevel.INFO
logger.trace("TraceTest") ; This Message should not be logged due to choosen loglevel
logger.info("InfoTest") ; This Message should be logged!

For usage examples have a look at the files log4ahk_demoXX.ahk.

For more detailed documentation have a look into the source file log4ahk.ahk or online html-documentation

About

Logging for AutoHotkey

https://autohotkey-v2.github.io/log4ahk/

License:Do What The F*ck You Want To Public License


Languages

Language:AutoHotkey 98.4%Language:Shell 0.8%Language:Batchfile 0.8%