Updates
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
readInitdDisabledSet,
|
||||
writeInitdDisabledSet
|
||||
} from './bare-initd-user.js'
|
||||
import { getBareInitdJournalNdjson } from './bare-initd-journal.js'
|
||||
|
||||
/** @param {Uint8Array | null} buf @param {number} maxLines */
|
||||
function tailUtf8Lines(buf, maxLines) {
|
||||
@@ -112,6 +113,13 @@ export async function runSystemctlCli(ctx, argv) {
|
||||
return
|
||||
}
|
||||
await printLogTail(ctx, def.logPath, lines, 'journalctl')
|
||||
const jtext = getBareInitdJournalNdjson(unit)
|
||||
if (jtext.trim()) {
|
||||
const jl = jtext.trimEnd().split(/\r?\n/)
|
||||
const tailJ = jl.slice(-lines).join('\n')
|
||||
ctx.console.log('--- unit journal (NDJSON tail) ---')
|
||||
ctx.console.log(tailJ)
|
||||
}
|
||||
ctx.exitCode = ctx.exitCode ?? 0
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user