Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

on:
push:
branches: [master]
branches: [master,feature/improve-logging]
paths-ignore:
- "**/*.md"
workflow_dispatch:
Expand Down
21 changes: 16 additions & 5 deletions meshcore/agentcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ limitations under the License.
#endif

#include "agentcore.h"
#include "openframe_file_logger.h"
#include "signcheck.h"
#include "meshdefines.h"
#include "meshinfo.h"
Expand Down Expand Up @@ -4988,11 +4989,21 @@ int MeshAgent_AgentMode(MeshAgentHostContainer *agentHost, int paramLen, char **
{
agentHost->capabilities |= MeshCommand_AuthInfo_CapabilitiesMask_RECOVERY; parseCommands = 0;
}
if (strcmp(param[ri], "--openframe-mode") == 0)
{
agentHost->openFrameMode = true; parseCommands = 0;
printf("OpenFrame Mode: %d\n", agentHost->openFrameMode);
}
if (strcmp(param[ri], "--openframe-mode") == 0)
{
agentHost->openFrameMode = true; parseCommands = 0;
printf("OpenFrame Mode: %d\n", agentHost->openFrameMode);

// Use fixed log directory for OpenFrame
#ifdef WIN32
const char* logDir = "C:\\ProgramData\\OpenFrame\\meshcentral-agent";
#else
const char* logDir = "/var/log/openframe/meshcentral-agent";
#endif

printf("Log directory: %s\n", logDir);
enable_file_logging(logDir, "meshagent");
}
if (strcmp(param[ri], "--openframe-secret") == 0 && ((ri + 1) < paramLen))
{
agentHost->openFrameSecret = param[ri + 1]; parseCommands = 0;
Expand Down
Loading
Loading