mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 22:11:38 +00:00
Update logging and enhance .gitignore for Atlas directory
- Introduced a logging system using `tracing` and related crates to improve log management and output formatting. - Updated `.gitignore` to include the `.atlas/` directory, ensuring that log files and other generated content are not tracked by Git. - Enhanced project templates to include the new `.gitignore` settings for Atlas in various project types. These changes aim to improve logging capabilities and maintain a cleaner repository by ignoring unnecessary files.
This commit is contained in:
parent
b5583c4c1b
commit
3fd50df0b2
29 changed files with 1463 additions and 79 deletions
|
|
@ -6,6 +6,7 @@ local Packages = Rojo.Packages
|
|||
local Log = require(Packages.Log)
|
||||
|
||||
local Config = require(script.Parent.Config)
|
||||
local ConsoleOutput = require(script.Parent.McpTools.Utils.ConsoleOutput)
|
||||
local strict = require(script.Parent.strict)
|
||||
|
||||
local RECONNECT_INTERVAL = 5
|
||||
|
|
@ -62,6 +63,7 @@ function McpStream:stop()
|
|||
end
|
||||
|
||||
function McpStream:_disconnect()
|
||||
ConsoleOutput.onLogMessage = nil
|
||||
if self._wsClient then
|
||||
pcall(function()
|
||||
self._wsClient:Destroy()
|
||||
|
|
@ -95,6 +97,19 @@ function McpStream:_tryConnect()
|
|||
wsClient:Send(greeting)
|
||||
end)
|
||||
|
||||
ConsoleOutput.onLogMessage = function(message: string, messageType: Enum.MessageType)
|
||||
if not self._wsClient then
|
||||
return
|
||||
end
|
||||
pcall(function()
|
||||
self._wsClient:Send(HttpService:JSONEncode({
|
||||
type = "roblox_log",
|
||||
message = message,
|
||||
level = messageType.Value,
|
||||
}))
|
||||
end)
|
||||
end
|
||||
|
||||
local done = false
|
||||
local closed, errored, received
|
||||
|
||||
|
|
@ -195,6 +210,7 @@ function McpStream:_tryConnect()
|
|||
|
||||
closed = wsClient.Closed:Connect(function()
|
||||
done = true
|
||||
ConsoleOutput.onLogMessage = nil
|
||||
closed:Disconnect()
|
||||
errored:Disconnect()
|
||||
received:Disconnect()
|
||||
|
|
@ -203,6 +219,7 @@ function McpStream:_tryConnect()
|
|||
|
||||
errored = wsClient.Error:Connect(function(_code, _msg)
|
||||
done = true
|
||||
ConsoleOutput.onLogMessage = nil
|
||||
closed:Disconnect()
|
||||
errored:Disconnect()
|
||||
received:Disconnect()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue