weaver
weaver copied to clipboard
deploy the application error
Hi I got the same error but on mac
filename "...2f6add44-e6ff-4bff-8d89-8ebe81a69af3.error.log" must have format "<app>.<deployment>.<weavelet>.<level>.log"
Any idea ??
Thanks @y26s4824k264 and @alejandrojnm for filing this bug! Here's what I think is happening.
When you weaver multi deploy
an application, the application's logs are written to files in /tmp/serviceweaver/logs/weaver-multi
. This following code computes the names of the log files as a concatenation of four things (the app name, the deployment id, the weavelet id, and the log level):
https://github.com/ServiceWeaver/weaver/blob/262d632dfaa2654e6e94aa4a73a0ccd8302253b7/runtime/logging/files.go#L149-L151
Elsewhere in the code, we try to parse these four things out of the filename:
https://github.com/ServiceWeaver/weaver/blob/262d632dfaa2654e6e94aa4a73a0ccd8302253b7/runtime/logging/files.go#L167-L171
By default, if you don't provide an application name, Service Weaver takes the name of the binary as the application name. So, what I think is happening is that Service Weaver is taking the name of the binary (i.e. awesomeProject2.exe
) as the application name, but because it has a period in it, it is messing up how we parse log filenames.
This is a bug, and we'll fix it. In the meantime, try explicitly adding an application name to your config file:
[serviceweaver]
name = "awesomeProject2"
binary = "./awesomeProject2.exe"
@mwhittaker I put the name and I got the same error this is the toml file
[serviceweaver]
name = "api"
binary = "./api"
Do you mind trying to delete all the log files in /tmp/serviceweaver/logs/weaver-multi
and then trying again? The ill-formatted log file might still exist and could be messing things up.
I don't have that in my tmp
folder
I don't have that in my
tmp
folder
Most likely if you are on a Mac it'll be under the /var/folders
temporary directory
On win11, Win+R and input %temp%
to open the temp dir. delete all the log files is ok !
On win11, Win+R and input
%temp%
to open the temp dir. delete all the log files is ok !
%temp%\serviceweaver\logs\weaver-multi it seems that weaver multi is not supported on win10
I'm closing this issue because it seems resolved? Feel free to re-open if not.
I think this should also be added to the official documentation(https://serviceweaver.dev/docs.html#multiprocess). Or, would it be difficult to apply branch handling only for windows?
Currently, it is difficult to solve without looking at this issue.
https://github.com/ServiceWeaver/weaver/pull/232
What do you think of processing in this form? Are there side effects or other issues?