Skip to content

Commit

Permalink
trim output path off file path
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnewhall committed Feb 17, 2024
1 parent 512f20c commit 97afe9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/fog/fog.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (p *packet) Handler(config *Config, memory *willow.Willow) {
}

// Combine our base path with the filename path provided in the packet.
filePath := filepath.Join(config.OutputPath, settings["filepath"])
filePath := filepath.Join(config.OutputPath, strings.TrimPrefix(settings["filepath"], config.OutputPath))
fileBuffer := memory.Get(filePath)

if fileBuffer == nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/fog/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (c *Config) PrintConfig() {
c.Printf("=> Listen Address: %s", c.ListenAddr)
c.Printf("=> Output Path: %s", c.OutputPath)
c.Printf("=> Flush Interval: %s", c.FlushInterval)
c.Printf("=> Buffers; UDP/Packet: %d/%d", c.BufferUDP, c.BufferPacket)
c.Printf("=> Buffers; UDP/Packet/Chan: %d/%d/%d", c.BufferUDP, c.BufferPacket, c.BufferChan)
c.Printf("=> Threads; Listen/Process: %d/%d", c.Listeners, c.Processors)

if c.LogFile != "" {
Expand Down

0 comments on commit 97afe9a

Please sign in to comment.