Skip to content

Python library daemon, asyncio terminal, logger

Notifications You must be signed in to change notification settings

bitaps-com/daemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

Python daemonizer package

This is a Python module that will daemonize your Python script so it can continue running in the background. It works on Unix, Linux and OS X, creates a PID file and has standard commands (start, stop, virtual console), integrated logger.

Usage

daemon.start()

... 
rest code will be executed as daemon

Command line arguments

--terminal

If daemon not yet started, start daemon and forward all output to console.
CTRL+C stop console, but daemon continue working.
If daemon already started connect to dameon virtual console and forward output to console. All inputs from console forward to daemon process stdin.

--xterminal

Same as --terminal but Start advanced vitual console.

--stop

Terminate daemon.

Integrated logger

...
logger = daemon.getLogger('test')

log.info('info message')
log.error('error message')
log.debug('debug message')

...
logger.setLevel(daemon.WARNING)
...

About

Python library daemon, asyncio terminal, logger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages