Open lukevers opened 10 years ago
To continue with the organization I'm currently deciding between this:
logs
└── {server}
└── {channel}
└── {year}
└── {month}
└── {day}.log
and this:
logs
└── {server}
└── {channel}
└── {date}.log
although I'm leaning toward the first option. I like to keep my files in order! My idea is that each line will be like the following:
[hh::mm::ss] <username>: text
Something else to think about is an option for where the logs should go. It's unrealistic to think everyone is going to want to clone a git repository and build it. I think that could probably be something to add on later though.
As for where.. I'd say detect the GOOS and put it in a canonical location. If *nix, /var/log/kittens. If Windows... working directory where it was run from? "%userprofile%/Docuemnts/kittens/"? Maybe make it a configuration flag to let the user set their log location or whether or not to have logs at all?
Yeah totally; when I made this issue /var/log
must have slipped my mind. No clue about where windows systems keep their logs, but on *nix systems that would work perfectly.
I think that putting it as a command line flag would be the a good option. Then just check to make sure the directory exists and is writable. Let the user specify if/where to store the logs.
As of right now the bot creates directories like the following:
But that is all that it currently does.