Commit Graph

9 Commits

Author SHA1 Message Date
Chris S. Kim c9735476a7
Fix Windows logging to files (#11960) 2022-01-06 16:07:09 -05:00
Daniel Nephin b140dd61b5 logging: call pruneFiles on startup
To ensure that files are pruned before a new one is created.

Also clean up the logic in pruneFiles
2020-11-20 19:07:45 -05:00
Daniel Nephin a0e0768f9a logging: remove unnecessary package vars 2020-11-20 19:07:45 -05:00
Daniel Nephin 7349018ff3 logging: Setup accept io.Writer instead of []io.Writer
Also accept a non-pointer Config, since the config is not modified
2020-08-19 13:20:41 -04:00
Daniel Nephin 84642486b9 agent: extract dependency creation from New
With this change, Agent.New() accepts many of the dependencies instead
of creating them in New. Accepting fully constructed dependencies from
a constructor makes the type easier to test, and easier to change.

There are still a number of dependencies created in Start() which can
be addressed in a follow up.
2020-08-18 19:04:55 -04:00
Daniel Nephin 67c505cd90 Remove LogOutput from Agent
Now that it is no longer used, we can remove this unnecessary field. This is a pre-step in cleanup up RuntimeConfig->Consul.Config, which is a pre-step to adding a gRPCHandler component to Server for streaming.

Removing this field also allows us to remove one of the return values from logging.Setup.
2020-08-05 14:00:44 -04:00
Matt Keeler 2c7844d220
Implement Client Agent Auto Config
There are a couple of things in here.

First, just like auto encrypt, any Cluster.AutoConfig RPC will implicitly use the less secure RPC mechanism.

This drastically modifies how the Consul Agent starts up and moves most of the responsibilities (other than signal handling) from the cli command and into the Agent.
2020-06-17 16:49:46 -04:00
Deepjyoti Mondal f257eb50bc Relates to #7447
This PR will allow consul to throw log error if provided
log directory has permission issues for writing or is non existent.

Signed-off-by: Deepjyoti Mondal djmdeveloper060796@gmail.com
2020-04-19 14:44:54 +05:30
Chris Piraino 3dd0b59793
Allow users to configure either unstructured or JSON logging (#7130)
* hclog Allow users to choose between unstructured and JSON logging
2020-01-28 17:50:41 -06:00
Renamed from logger/logger.go (Browse further)