diff options
-rw-r--r-- | server/src/log.lua | 2 | ||||
-rw-r--r-- | server/src/workspace.lua | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/server/src/log.lua b/server/src/log.lua index 3826e4f4..eb34505a 100644 --- a/server/src/log.lua +++ b/server/src/log.lua @@ -81,6 +81,8 @@ end function log.init(root, path) log.path = path:string() log.prefix_len = #root:string() + 3 + log.file = nil + log.size = 0 if not fs.exists(path:parent_path()) then fs.create_directories(path:parent_path()) end diff --git a/server/src/workspace.lua b/server/src/workspace.lua index aefabb04..5582ca8d 100644 --- a/server/src/workspace.lua +++ b/server/src/workspace.lua @@ -74,6 +74,9 @@ function mt:init(rootUri) return end log.info('Workspace inited, root: ', self.root) + local logPath = ROOT / 'log' / (rootUri:gsub('[/:]+', '_') .. '.log') + log.info('Log path: ', logPath) + log.init(ROOT, logPath) async.call([[ require 'utility' local fs = require 'bee.filesystem' |