Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File example for config folder #8

Open
camjac251 opened this issue Oct 24, 2018 · 2 comments
Open

File example for config folder #8

camjac251 opened this issue Oct 24, 2018 · 2 comments

Comments

@camjac251
Copy link

camjac251 commented Oct 24, 2018

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.

@iesl2
Copy link

iesl2 commented Mar 18, 2019

@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!

@xagaba
Copy link

xagaba commented Jul 12, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants