From 367c1a6a208146377c3c1948df2271c6657766b0 Mon Sep 17 00:00:00 2001 From: Luis Blanco Date: Mon, 4 Nov 2024 23:11:11 +0400 Subject: [PATCH] Add custom log example --- examples/custom.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 examples/custom.js diff --git a/examples/custom.js b/examples/custom.js new file mode 100644 index 0000000..6cd3e75 --- /dev/null +++ b/examples/custom.js @@ -0,0 +1,13 @@ +'use strict'; + +const { ensuredir, write } = require('addon-tools-raub'); +const { setLogPath, causeSegfault } = require('..'); + +(async () => { + await ensuredir('c:/tmp'); + await write('c:/tmp/segfault.txt', ''); + + setLogPath('c:/tmp/segfault.txt'); + causeSegfault(); +})(); +