1. jordilin
  2. alerta
  3. Issues
Issue #9 new

config dir by default

created an issue


I think maybe good idea having a default dir config where you can have your config files, it would allow to use bash-complete feature, I think that would be nice

Sorry if I'm pestering with all that small enhancement


Comments (3)

  1. jordilin repo owner

    You can currently pass with -c the whereabouts of your configuration file. If you don't, then it searches your home directory for a file called .log4tailer. The default 'config_dir' : "/etc/log4tail" that you propose would have to be created in the operating system where you want to install log4tailer. The alt_config in defaults always exists (is the user home directory). One of the benefits of log4tailer is that it runs in standalone mode (no installation if you don't want to) and having that /etc/log4tail/config would contradict that benefit. You can always do:

    bin/log4tailer -c /etc/log4tail/config/yourconfig.cfg /pathtoyourlog

    I don't understand when you say it would allow to use bash-complete feature. Bash by default has auto completion in any modern Linux distro around.

  2. i5513 reporter

    Ok, maybe when packagers from distros take your application, they can create that directory.Having such "global config dir" would be an feature, and if you don't want that dir, you will not create /etc/log4tail, so nothing change. Many programs search first in alt_config (user directory configuration), and then in the global config dir (there are other programs that merge that two directories, allowing to have general option for all users, and that every user can overwrite their config with their config directory)

    I was refering to log4tail custom autocomplete feature (eg you write "log4tailer <TAB>" and it could show you all your config files and then you chose the one you want).

    Close this bug if you don't see that option like interesting

    Thank you!

  3. jordilin repo owner

    Right, I seem to see what you mean. We can have the global /etc/log4tailer/config.cfg apart from the local /home/user/.log4tailer.cfg like many Linux programs have (ex. vim with .vimrc). If /.log4tailer.cfg does not exist, we look at the global if it exists (leaving that possibility to packagers to create it if they want to). If global does not exist, then we have the default options. Easy to implement, so we will add this to next release. You'll always have the possibility to override passing the -c pathtoconfig.

  4. Log in to comment