Skip to content

haraldh/bash_journal_log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bash_journal_log

This is WORK IN PROGRESS! DO NOT USE IN PRODUCTION!

This is bash_journal_log, a systemd journal interface for bash.

bash_journal_log is a bash plugin that provides the systemd logging infrastructure directly in your shell.

A (very) simple example will help illustrate:

$ BASH_LOG_TARGET=journal-or-kmsg log_open MYAPP
$ log_msg "Hello World"
$ journalctl -e | tail -1
Jul 31 19:55:58 MYAPP[6994]: Hello World

See the test.sh file in the git tree.

Also bash_journal_log logs

  • CODE_FILE=$BASH_SOURCE
  • CODE_LINE=$LINENO
  • CODE_FUNCTION=$FUNCNAME[0]

About

bash builtin module for systemd journal logging

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages