tailon icon indicating copy to clipboard operation
tailon copied to clipboard

File example for config folder

Open camjac251 opened this issue 7 years ago • 2 comments

Is it possible to include an example of how the config would work with aliases and paths

The readme just shows

File, glob and dir filespecs are similar in principle to their # command-line counterparts.

which isn't helpful. I have tried different combinations of what I think it might be couldn't figure it out.

camjac251 avatar Oct 24 '18 16:10 camjac251

@gvalkov,

I'm also interested in how may we define files in the config:

For example:

# General
title = "Tailon file viewer"
relative-root = "/"
listen-addr = ["0.0.0.0:5000"]
allow-download = true
allow-commands = ["tail", "grep", "sed", "awk"]

# Files
alias=Tailon,group=Tailon,/var/log/tailon*

But got the error: Error parsing config: (9, 9): keys cannot contain , character

I also tried some different variants:

# Files
file = ["alias=Tailon", "group=Tailon", "/var/log/tailon*"]

panic: interface conversion: interface {} is nil, not toml.Tree

[files]

  [files.tailon]
  alias = "Tailon"
  group = "Tailon"
  files = "/var/log/tailon*"

[files]
  files = ["Tailon", "Tailon", "/var/logs/tailon*"]

*No files specified on command-line or in config file

No any of these variants works.

May you please provide an example how may we specify files in the config file?

Thank you!

iesl2 avatar Mar 18 '19 10:03 iesl2

I read the source code and seems that reading 'filespecs' from config file it's not supported / developed right now. I use config.toml por all except filespecs configuration, I put this in the command line and works fine

xagaba avatar Jul 12 '19 07:07 xagaba