necessary things
This commit is contained in:
parent
89a0eb93e6
commit
5d5b06ddd3
@ -46,7 +46,7 @@ namespace NadekoBot
|
|||||||
Localizer = new Localization();
|
Localizer = new Localization();
|
||||||
Youtube = new YoutubeService();
|
Youtube = new YoutubeService();
|
||||||
Stats = new StatsService(Client);
|
Stats = new StatsService(Client);
|
||||||
_log = LogManager.GetCurrentClassLogger();
|
|
||||||
|
|
||||||
//setup DI
|
//setup DI
|
||||||
var depMap = new DependencyMap();
|
var depMap = new DependencyMap();
|
||||||
@ -73,6 +73,7 @@ namespace NadekoBot
|
|||||||
|
|
||||||
private void SetupLogger()
|
private void SetupLogger()
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var logConfig = new LoggingConfiguration();
|
var logConfig = new LoggingConfiguration();
|
||||||
@ -85,10 +86,12 @@ namespace NadekoBot
|
|||||||
logConfig.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, consoleTarget));
|
logConfig.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, consoleTarget));
|
||||||
|
|
||||||
LogManager.Configuration = logConfig;
|
LogManager.Configuration = logConfig;
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
Console.WriteLine(ex);
|
Console.WriteLine(ex);
|
||||||
}
|
}
|
||||||
|
_log = LogManager.GetCurrentClassLogger();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task Client_MessageReceived(IMessage imsg)
|
private Task Client_MessageReceived(IMessage imsg)
|
||||||
|
@ -27,6 +27,7 @@ namespace NadekoBot.Services.Impl
|
|||||||
|
|
||||||
public BotCredentials()
|
public BotCredentials()
|
||||||
{
|
{
|
||||||
|
File.WriteAllText("./credentials_example.json", JsonConvert.SerializeObject(new CredentialsModel(), Formatting.Indented));
|
||||||
_log = LogManager.GetCurrentClassLogger();
|
_log = LogManager.GetCurrentClassLogger();
|
||||||
if (File.Exists("./credentials.json"))
|
if (File.Exists("./credentials.json"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user