forked from aseprite/aseprite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog.cpp
More file actions
40 lines (30 loc) · 763 Bytes
/
log.cpp
File metadata and controls
40 lines (30 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Aseprite
// Copyright (C) 2001-2016 David Capello
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "app/log.h"
#include "app/app.h"
#include "app/resource_finder.h"
#include "base/log.h"
namespace app {
LoggerModule::LoggerModule(bool createLogInDesktop)
{
app::ResourceFinder rf(false);
if (createLogInDesktop)
rf.includeDesktopDir(PACKAGE "-v" VERSION "-DebugOutput.txt");
else
rf.includeUserDir("aseprite.log");
auto filename = rf.defaultFilename();
base::set_log_filename(filename.c_str());
}
LoggerModule::~LoggerModule()
{
LOG("LOG: Done\n");
// Close log file
base::set_log_filename("");
}
} // namespace app