RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
Class which represents the options for a file logger. More...
#include <FileLogDestination.hpp>
Public Member Functions | |
FileLogOptions (system::FilePath in_directory) | |
Constructor. More... | |
FileLogOptions (system::FilePath in_directory, bool in_warnSyslog) | |
Constructor. More... | |
FileLogOptions (system::FilePath in_directory, std::string in_fileMode, double in_maxSizeMb, int in_rotationDays, int in_maxRotations, int in_deletionDays, bool in_doRotation, bool in_includePid, bool in_warnSyslog, bool in_forceLogDirectory) | |
Constructor. More... | |
int | getDeletionDays () const |
Gets the number of days a rotated log file should persist before being deleted. More... | |
const system::FilePath & | getDirectory () const |
Gets the directory where log files should be written. More... | |
const std::string & | getFileMode () const |
Gets the permissions with which log files should be created. More... | |
bool | getForceDirectory () const |
Gets whether or not the log directory is forced, preventing user override. More... | |
int | getMaxRotations () const |
Gets the maximum number of allowed rotated log files. More... | |
double | getMaxSizeMb () const |
Gets the maximum size of log files, in MB. More... | |
int | getRotationDays () const |
Gets the number of days a log file should persist before being rotated. More... | |
bool | doRotation () const |
Returns whether or not to rotate log files before overwriting them. More... | |
bool | includePid () const |
Returns whether or not to include the PID in the log filename. More... | |
bool | warnSyslog () const |
Returns whether or not to also send warn/error logs to syslog for admin visibility. More... | |
void | setDeletionDays (int in_deletionDays) |
Sets the number of days a rotated log file should persist before being deleted. More... | |
void | setDirectory (const system::FilePath &in_directory) |
Sets the directory where log files should be written. More... | |
void | setFileMode (const std::string &in_fileMode) |
Sets the permissions with which the log files should be created. More... | |
void | setForceDirectory (bool in_forceDirectory) |
Sets whether or not the log directory is forced, preventing user override. More... | |
void | setMaxRotations (int in_maxRotations) |
Sets the maximum number of allowed rotated log files. More... | |
void | setMaxSizeMb (double in_maxSizeMb) |
Sets the maximum size of the log files, in MB. More... | |
void | setRotationDays (int in_rotationDays) |
Sets the number of days a log file should persist before being rotated. More... | |
void | setDoRotation (bool in_doRotation) |
Sets whether or not to rotate log files before overwriting them. More... | |
void | setIncludePid (bool in_includePid) |
Sets whether or not to include the PID of the process in the log filename. More... | |
void | setWarnSyslog (bool in_warnSyslog) |
Sets whether or not to also send warn/error logs to syslog for admin visibility. More... | |
Class which represents the options for a file logger.
rstudio::launcher_plugins::logging::FileLogOptions::FileLogOptions | ( | system::FilePath | in_directory | ) |
Constructor.
This constructor is intentionally not explicit to allow for conversion from system::FilePath to FileLogOptions.
in_directory | The directory in which to create log files. |
rstudio::launcher_plugins::logging::FileLogOptions::FileLogOptions | ( | system::FilePath | in_directory, |
bool | in_warnSyslog | ||
) |
Constructor.
This constructor is intentionally not explicit to allow for conversion from system::FilePath to FileLogOptions.
in_directory | The directory in which to create log files. |
in_warnSyslog | Whether or not to also send warn/error logs to syslog for admin visibility. |
rstudio::launcher_plugins::logging::FileLogOptions::FileLogOptions | ( | system::FilePath | in_directory, |
std::string | in_fileMode, | ||
double | in_maxSizeMb, | ||
int | in_rotationDays, | ||
int | in_maxRotations, | ||
int | in_deletionDays, | ||
bool | in_doRotation, | ||
bool | in_includePid, | ||
bool | in_warnSyslog, | ||
bool | in_forceLogDirectory | ||
) |
Constructor.
in_directory | The directory in which to create log files. |
in_fileMode | The permissions to set on log files. |
in_maxSizeMb | The maximum size of log files, in MB, before they are rotated and/or overwritten. |
in_rotationDays | The number of days a log file should be kept before being rotated. |
in_maxRotations | The maximum number of allowed rotated log files. |
in_deleteDays | The number of days a rotated log file should be kept before being deleted. |
in_doRotation | Whether to rotate log files or not. |
in_includePid | Whether to include the PID of the process in the log filename. |
in_warnSyslog | Whether or not to also send warn/error logs to syslog for admin visibility. |
in_forceLogDirectory | Whether or not the log directory is forced, preventing user override. |
bool rstudio::launcher_plugins::logging::FileLogOptions::doRotation | ( | ) | const |
Returns whether or not to rotate log files before overwriting them.
int rstudio::launcher_plugins::logging::FileLogOptions::getDeletionDays | ( | ) | const |
Gets the number of days a rotated log file should persist before being deleted.
const system::FilePath& rstudio::launcher_plugins::logging::FileLogOptions::getDirectory | ( | ) | const |
Gets the directory where log files should be written.
const std::string& rstudio::launcher_plugins::logging::FileLogOptions::getFileMode | ( | ) | const |
Gets the permissions with which log files should be created.
bool rstudio::launcher_plugins::logging::FileLogOptions::getForceDirectory | ( | ) | const |
Gets whether or not the log directory is forced, preventing user override.
int rstudio::launcher_plugins::logging::FileLogOptions::getMaxRotations | ( | ) | const |
Gets the maximum number of allowed rotated log files.
double rstudio::launcher_plugins::logging::FileLogOptions::getMaxSizeMb | ( | ) | const |
Gets the maximum size of log files, in MB.
int rstudio::launcher_plugins::logging::FileLogOptions::getRotationDays | ( | ) | const |
Gets the number of days a log file should persist before being rotated.
bool rstudio::launcher_plugins::logging::FileLogOptions::includePid | ( | ) | const |
Returns whether or not to include the PID in the log filename.
void rstudio::launcher_plugins::logging::FileLogOptions::setDeletionDays | ( | int | in_deletionDays | ) |
Sets the number of days a rotated log file should persist before being deleted.
in_deletionDays | The number of days a rotated log file should be kept before being deleted. |
void rstudio::launcher_plugins::logging::FileLogOptions::setDirectory | ( | const system::FilePath & | in_directory | ) |
Sets the directory where log files should be written.
in_directory | The directory in which to create log files. |
void rstudio::launcher_plugins::logging::FileLogOptions::setDoRotation | ( | bool | in_doRotation | ) |
Sets whether or not to rotate log files before overwriting them.
in_doRotation | Whether to rotate log files or not. |
void rstudio::launcher_plugins::logging::FileLogOptions::setFileMode | ( | const std::string & | in_fileMode | ) |
Sets the permissions with which the log files should be created.
in_fileMode | The permissions to set on log files. |
void rstudio::launcher_plugins::logging::FileLogOptions::setForceDirectory | ( | bool | in_forceDirectory | ) |
Sets whether or not the log directory is forced, preventing user override.
in_forceDirectory | Whether or not the log directory is forced, preventing user override. |
void rstudio::launcher_plugins::logging::FileLogOptions::setIncludePid | ( | bool | in_includePid | ) |
Sets whether or not to include the PID of the process in the log filename.
in_includePid | Whether to include the PID of the process in the log file name. |
void rstudio::launcher_plugins::logging::FileLogOptions::setMaxRotations | ( | int | in_maxRotations | ) |
Sets the maximum number of allowed rotated log files.
in_maxRotations | The maximum number of allowed rotated log files. |
void rstudio::launcher_plugins::logging::FileLogOptions::setMaxSizeMb | ( | double | in_maxSizeMb | ) |
Sets the maximum size of the log files, in MB.
in_maxSizeMb | The maximum size of log files, in MB, before they are rotated and/or overwritten. |
void rstudio::launcher_plugins::logging::FileLogOptions::setRotationDays | ( | int | in_rotationDays | ) |
Sets the number of days a log file should persist before being rotated.
in_rotationDays | The number of days a log file should be kept before being rotated. |
void rstudio::launcher_plugins::logging::FileLogOptions::setWarnSyslog | ( | bool | in_warnSyslog | ) |
Sets whether or not to also send warn/error logs to syslog for admin visibility.
in_warnSyslog | Whether or not to also send warn/error logs to syslog for admin visibility. |
bool rstudio::launcher_plugins::logging::FileLogOptions::warnSyslog | ( | ) | const |
Returns whether or not to also send warn/error logs to syslog for admin visibility.