PageSourceSearch

https://bacalhau.org/assets/js/12772722.b9ea2d51.js

js bacalhau.org collected 2026-10-02 08:42:16 UTC 7,937 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkbacalhau_website||=[]).push([[1513],{8080(e,n,s){s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>t});const i=JSON.parse('{"id":"cli/job/logs","title":"Logs","description":"Retrieve logs from a running or completed Bacalhau job for monitoring and debugging.","source":"@site/docs/cli/job/logs.md","sourceDirName":"cli/job","slug":"/cli/job/logs","permalink":"/docs/cli/job/logs","draft":false,"unlisted":false,"editUrl":"https://github.com/bacalhau-project/docs/tree/main/docs/cli/job/logs.md","tags":[],"version":"current","lastUpdatedAt":1785514175000,"frontMatter":{"description":"Retrieve logs from a running or completed Bacalhau job for monitoring and debugging."},"sidebar":"cliApi","previous":{"title":"List Jobs","permalink":"/docs/cli/job/list"},"next":{"title":"Run","permalink":"/docs/cli/job/run"}}');var l=s(4848),o=s(8453);const r={description:"Retrieve logs from a running or completed Bacalhau job for monitoring and debugging."},c="Logs",a={},t=[{value:"Description",id:"description",level:2},{value:"Usage",id:"usage",level:2},{value:"Flags",id:"flags",level:2},{value:"Global Flags",id:"global-flags",level:2},{value:"Examples",id:"examples",level:2}];function d(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.header,{children:(0,l.jsx)(n.h1,{id:"logs",children:"Logs"})}),"\n",(0,l.jsx)(n.h2,{id:"description",children:"Description"}),"\n",(0,l.jsxs)(n.p,{children:["The ",(0,l.jsx)(n.code,{children:"bacalhau job logs"})," command allows users to retrieve logs from a job that has been previously submitted. This command is useful for tracking and debugging the progress and state of a running or completed job."]}),"\n",(0,l.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"bacalhau job logs [id] [flags]\n"})}),"\n",(0,l.jsx)(n.h2,{id:"flags",children:"Flags"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"-f"}),", ",(0,l.jsx)(n.code,{children:"--follow"}),":\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Description: This flag allows the user to follow the logs in real-time after fetching the current logs. It provides a continuous stream of log updates, similar to ",(0,l.jsx)(n.code,{children:"tail -f"})," in Unix-like systems."]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"-h"}),", ",(0,l.jsx)(n.code,{children:"--help"}),":\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Description: Display help information for the ",(0,l.jsx)(n.code,{children:"logs"})," command."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"global-flags",children:"Global Flags"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"--api-host string"}),":\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Description: Specifies the host for the client and server to communicate through REST. This flag is disregarded if the ",(0,l.jsx)(n.code,{children:"BACALHAU_API_HOST"})," environment variable is set."]}),"\n",(0,l.jsxs)(n.li,{children:["Default: ",(0,l.jsx)(n.code,{children:"bootstrap.production.bacalhau.org"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"--api-port int"}),":\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Description: Sets the port for RESTful communication between the client and server. If the ",(0,l.jsx)(n.code,{children:"BACALHAU_API_PORT"})," environment variable is available, this flag is ignored."]}),"\n",(0,l.jsxs)(n.li,{children:["Default: ",(0,l.jsx)(n.code,{children:"1234"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"--log-mode logging-mode"}),":\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Description: Determines the desired log format. Available options include ",(0,l.jsx)(n.code,{children:"default"}),", ",(0,l.jsx)(n.code,{children:"station"}),", ",(0,l.jsx)(n.code,{children:"json"}),", ",(0,l.jsx)(n.code,{children:"combined"}),", and ",(0,l.jsx)(n.code,{children:"event"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:["Default: ",(0,l.jsx)(n.code,{children:"default"})]}),"\n"]}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"--repo string"}),":\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Description: Specifies the path to the bacalhau repository."}),"\n",(0,l.jsxs)(n.li,{children:["Default: ",(0,l.jsx)(n.code,{children:"$HOME/.bacalhau"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Display Logs for a Previously Submitted Job with Full ID"}),":"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Command:"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"bacalhau job logs j-51225160-807e-48b8-88c9-28311c7899e1\n"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Expected Output:"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"[2023-09-24 09:01:32] INFO - Application started successfully.\n[2023-09-24 09:01:33] DEBUG - Initializing database connections.\n[2023-09-24 09:01:35] WARN - API rate limit approaching.\n[2023-09-24 09:02:01] ERROR - Failed to retrieve data from endpoint: /api/v1/data.\n[2023-09-24 09:05:00] INFO - Data sync completed with 4500 new records.\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Follow Logs in Real-Time"}),":"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Command:"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"bacalhau job logs --follow j-51225160-807e-48b8-88c9-28311c7899e1\n"})}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Expected Output"}),":"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"[2023-09-24 11:30:02] INFO - User 'john_doe' logged in successfully.\n[2023-09-24 11:30:15] DEBUG - Fetching data from cache for key: userSettings_john_doe.\n[2023-09-24 11:31:05] WARN - High memory usage detected: 85% of allocated resources.\n... [Logs continue to appear in real-time] ...\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.li,{children:["\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Display Logs Using a Shortened ID"}),":"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Command:"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"bacalhau job logs j-ebd9bf2f\n"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Expected Output:"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"[2023-09-24 10:15:12] INFO - Application initialization sequence started.\n[2023-09-24 10:15:13] DEBUG - Loading configurations from /config/app.json.\n[2023-09-24 10:15:14] INFO - Connected to message broker successfully.\n[2023-09-24 10:16:00] ER
1ROR - Failed to send email notification to [email protected].\n"})}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(d,{...e})}):d(e)}},8453(e,n,s){s.d(n,{R:()=>r,x:()=>c});var i=s(6540);const l={},o=i.createContext(l);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.