Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
g41797 committed Oct 9, 2024
1 parent d7e7a4c commit c5f2d07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![](_logo/syslogzig-removebg.png)

# syslog
# Zig syslog client

[![CI](https://github.com/g41797/syslog/actions/workflows/ci.yml/badge.svg)](https://github.com/g41797/syslog/actions/workflows/ci.yml)

Expand Down
1 change: 1 addition & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub fn build(b: *std.Build) void {
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
.single_threaded = false,
});

lib.root_module.addImport("zig-datetime", zig_datetime.module("zig-datetime"));
Expand Down
7 changes: 4 additions & 3 deletions src/syslog_tests.zig
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,15 @@ fn hellozig() !void {
defer logger.deinit();

// Send syslog message
try logger.write_info("Hello Zig");
try logger.write_info("Hello, Zig!");

const result = try sd.msgs.receive(10000000000);
defer std.testing.allocator.destroy(result);
const len = result.letter.len;
std.debug.print("\n{s}\n", .{result.letter.buff[0..len]});

// <190>1 2024-09-30T11:11:21+00:00 BLKF zigprocess 6734 1 - Hello Zig
_ = std.mem.containsAtLeast(u8, result.letter.buff[0..len], 1, "Hello Zig");
// <190>1 2024-10-09T09:07:11+00:00 BLKF zigprocess 18548 1 - Hello, Zig!
_ = std.mem.containsAtLeast(u8, result.letter.buff[0..len], 1, "Hello, Zig!");

return;
}

0 comments on commit c5f2d07

Please sign in to comment.