mirror of
https://github.com/OpenSolo/OpenSolo.git
synced 2025-04-29 22:24:32 +02:00
19 lines
487 B
Python
19 lines
487 B
Python
#!/usr/bin/env python
|
|
|
|
import os
|
|
import logging
|
|
import logging.config
|
|
|
|
class Logger():
|
|
def __init__(self):
|
|
if 'SOLOLINK_SANDBOX' in os.environ:
|
|
logging.config.fileConfig(os.path.join(os.path.dirname(__file__), 'sim/shotmanager.sandbox.conf'))
|
|
else:
|
|
logging.config.fileConfig("/etc/shotmanager.conf")
|
|
self.xlog = logging.getLogger("shot")
|
|
|
|
def log(self, data):
|
|
self.xlog.info(str(data).replace("\0", ""))
|
|
|
|
logger = Logger()
|