Operating System helper static class used internally. You should not use it. More...
#include <easylogging++.h>
Static Public Member Functions | |
static std::string | currentHost (void) |
Gets current host name or computer name. More... | |
static std::string | currentUser (void) |
Gets current username. More... | |
static const std::string | getBashOutput (const char *command) |
Runs command on terminal and returns the output. More... | |
static std::string | getEnvironmentVariable (const char *variableName, const char *defaultVal, const char *alternativeBashCommand=nullptr) |
Gets environment variable. This is cross-platform and CRT safe (for VC++) More... | |
static bool | termSupportsColor (void) |
Whether or not terminal supports colors. More... | |
Operating System helper static class used internally. You should not use it.
Definition at line 1130 of file easylogging++.h.
|
static |
Gets current host name or computer name.
For android systems this is device name with its manufacturer and model seperated by hyphen
Definition at line 1149 of file easylogging++.cc.
|
static |
Gets current username.
Definition at line 1136 of file easylogging++.cc.
|
static |
Runs command on terminal and returns the output.
This is applicable only on unix based systems, for all other OS, an empty string is returned.
command | Bash command |
Definition at line 1084 of file easylogging++.cc.
|
static |
Gets environment variable. This is cross-platform and CRT safe (for VC++)
variableName | Environment variable name |
defaultVal | If no environment variable or value found the value to return by default |
alternativeBashCommand | If environment variable not found what would be alternative bash command in order to look for value user is looking for. E.g, for 'user' alternative command will 'whoami' |
Definition at line 1112 of file easylogging++.cc.
|
static |
Whether or not terminal supports colors.
Definition at line 1162 of file easylogging++.cc.