| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds new logging handler redirecting messages to the log file
located in the Samba shared directory (applies to live mode
clients, i.e: ogLive)
Parses log level configuration from ogclient.json. See:
{
"opengnsys": {
...
"log": "INFO",
...
}
...
}
Adds --debug option to set root logger level to DEBUG when starting
ogClient. Overrides log level from config file.
In addition:
- Replaces any occurence of print with a corresponding logging function.
- Unsets log level for handlers, use root logger level instead.
- Default level for root logger is INFO.
- Replaces level from response log messages to debug (ogRest)
|
|
|
|
|
|
|
|
|
| |
ogClient allows the user to specify the json config path with optional
parameters -c / --config:
ogclient -c /foo/bar/foobar.json
If specified config file is malformed ogClient will fail to start.
|
|
|
|
|
|
|
|
|
|
| |
Commit 2dbcd18c06dd breaks interfaceAdm path for live operations.
Keep OG_PATH to the value prior to commit 2dbcd18c06dd.
Check platform before reading config file. If platform is different
from linux then look for cfg/ogclient.json in current folder and
do not use OG_PATH.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ogClient can be invoked with additional arguments to send
event datagrams to the default event datagram socket at
127.0.0.1 port 55885.
ogclient session events invokation syntax:
ogclient event login foobar
ogclient event logout foobar
If event commands arguments are detected, ogclient sends the
datagram and closes afterwards.
Datagram syntax for session event is:
session [start | stop] [user]
|
|
|
|
|
|
|
| |
If current platform is Linux (either live, virtual or linux) expect
/opt/opengnsys/ogclient/cfg/ to contain ogclient.json.
If current platform is not Linux then we fallback to current directory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can't use syslog if we want to execute ogClient in the Windows
platform.
Use the native logging library so we can attach different handlers
depending on the mode ogClient is executing.
Logging configuration is done via a python dict. There is a different
dict for linux and windows. These dicts define the configuration of the
root logger, handlers and formatters used.
As of now, it is only expected to use the root logger for everything
logging related. The root logger is obtained via:
LOGGER = logging.getLogger()
More info about handlers, formatters and loggers:
https://docs.python.org/3/howto/logging.html
Logging configuration is done at startup, just after parsing the json
(knowing ogclient mode). If json parsing goes bad, ogclient will only
print a message to stdout.
|
|
|
|
|
|
|
|
|
|
| |
SIGPIPE is only available on Unix. Add try/except so that this
import does not crash ogclient when running in Windows mode.
Only assign SIG_DFL handler to SIGPIPE when mode is not windows.
Prefer signal.signal over signal alone to better distinguish module from
function.
|
|
|
|
| |
Update license header in files.
|
|
|