Skip to content

OmnittyConfig

shanhui edited this page Apr 4, 2017 · 2 revisions

Omnitty Configuration

It's hard to use something that all designed by oneself.

  • Can I change log format and log file location?
  • Can I change the view size?
  • Can I load machines when the program start?

There are too many questions from my team.

So I make up my mind to support some user self-configuration.

Configurations

The configuration file is located in ~/.omnitty/config.json which in json format.

  • User-defined Size:

    Feature Details
    ListWindowWidth The width of the list window.
    SummaryWindowWidth The width of the summary window.
    TerminalWindowWidth The width of the terminal window.
  • Logger:

    Feature Details
    LogConfigFilePath Load log4cplus configuration from file.
    LogFilePath The log file path, use /tmp/omnitty.log by default. If user difined the LogConfigFilePath, then ignore this configuration.
    LogFormat Log format. If user difined the LogConfigFilePath, then ignore this configuration.
  • Machine List:

    Feature Details
    MachineFilePath Load machines from file when program start.
  • SSH:

    Feature Details
    SSHUserName SSH connect user name, use root by default.
    SSHUserPassword SSH connect user password, if defined SSHParam then ignore SSHUserPassword option.
    SSHParam SSH connect parameters, same as man ssh options.

Default configuration file

By default, the configuration file contents:

{
    "ListWindowWidth": 15,
    "SummaryWindowWidth": 15,
    "TerminalWindowWidth": 80,
    "LogConfigFilePath": "",
    "LogFilePath": "/tmp/omnitty.log",
    "LogFormat": "%d{%y-%m-%d %H:%M:%S} %p %l %m%n",
    "MachineFilePath": "",
    "SSHParam": "",
    "SSHUserName": "root",
    "SSHUserPassword": "",
}