"use strict";(self.webpackChunkdocs_openc3_com=self.webpackChunkdocs_openc3_com||[]).push([[1281],{1551:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>g,frontMatter:()=>r,metadata:()=>a,toc:()=>l});var s=o(1085),n=o(1184);const r={title:"Logging"},i=void 0,a={id:"guides/logging",title:"Logging",description:"The COSMOS Bucket Explorer tool provides a way to browse the COSMOS bucket storage backend whether you are running locally or in a cloud environment. Browse to http2900/tools/bucketexplorer and you should see the list of buckets at the top:",source:"@site/docs/guides/logging.md",sourceDirName:"guides",slug:"/guides/logging",permalink:"/tools/staticdocs/docs/guides/logging",draft:!1,unlisted:!1,editUrl:"https://github.com/OpenC3/cosmos/tree/main/docs.openc3.com/docs/guides/logging.md",tags:[],version:"current",frontMatter:{title:"Logging"},sidebar:"defaultSidebar",previous:{title:"Local Mode",permalink:"/tools/staticdocs/docs/guides/local-mode"},next:{title:"Monitoring",permalink:"/tools/staticdocs/docs/guides/monitoring"}},c={},l=[{value:"decom_logs & raw_logs",id:"decom_logs--raw_logs",level:3},{value:"text_logs",id:"text_logs",level:3},{value:"tool_logs",id:"tool_logs",level:3}];function d(e){const t={a:"a",h3:"h3",img:"img",p:"p",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:["The COSMOS ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/tools/bucket-explorer",children:"Bucket Explorer"})," tool provides a way to browse the COSMOS bucket storage backend whether you are running locally or in a cloud environment. Browse to ",(0,s.jsx)(t.a,{href:"http://localhost:2900/tools/bucketexplorer",children:"http://localhost:2900/tools/bucketexplorer"})," and you should see the list of buckets at the top:"]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Bucket Explorer",src:o(1530).A+"",width:"1272",height:"570"})}),"\n",(0,s.jsx)(t.p,{children:"Note the config and logs buckets are organized by scopes of which there initially is just one: DEFAULT. Clicking the DEFAULT folder in the logs bucket shows the decom_logs, raw_logs, reduced_xxx_logs, text_logs and tool_logs."}),"\n",(0,s.jsx)(t.h3,{id:"decom_logs--raw_logs",children:"decom_logs & raw_logs"}),"\n",(0,s.jsx)(t.p,{children:"The decom_logs and raw_logs folders contain the decommutated and raw command and telemetry data. Both are further broken down by target, packet, then date. For example, browsing into the DEFAULT/raw_logs/tlm/INST2// directory:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"raw_tlm_logs",src:o(6567).A+"",width:"1272",height:"557"})}),"\n",(0,s.jsxs)(t.p,{children:["Note the presence of the gzipped .bin files which contain the raw binary data. For more information about the structure of these files see the ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/development/log-structure",children:"Log Structure"})," developer documentation."]}),"\n",(0,s.jsx)(t.p,{children:"The default settings for the Logging microservice is to start a new log file every 10 minutes or 50MB, which ever comes first. In the case of the low data rate demo, the 10 minute mark is hit first."}),"\n",(0,s.jsxs)(t.p,{children:["To change the logging settings add the various CYCLE_TIME ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/plugins#target-modifiers",children:"Target Modifiers"})," under the declared ",(0,s.jsx)(t.a,{href:"/tools/staticdocs/docs/configuration/plugins#target-1",children:"TARGET"})," name in your plugin.txt."]}),"\n",(0,s.jsx)(t.h3,{id:"text_logs",children:"text_logs"}),"\n",(0,s.jsx)(t.p,{children:"The text_logs folder contains openc3_log_messages which contains text files that are again sorted by date and timestamped. These log messages come from the various microservices including the server and the target microservices. Thus these logs contain all the commands sent (in plain text) and telemetry checked. These log messages files are long term records of the messages in the CmdTlmServer Log Messages window:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"log_messages",src:o(7902).A+"",width:"1266",height:"469"})}),"\n",(0,s.jsx)(t.h3,{id:"tool_logs",children:"tool_logs"}),"\n",(0,s.jsx)(t.p,{children:"The tool_logs directory contains logs from the various COSMOS tools. Note that if you have not yet run any tools you may not see this directory as it is created on demand. Tool sub-directories are also created on demand. For example, after running a script in Script Runner a new 'sr' subdirectory appears which contains the script runner log resulting from running the script. In some cases logs in this directory may also be directly available from the tool itself. In the Script Runner case, the Script Messages pane below the script holds the output messages from the last script. Clicking the Download link allows you to download these messages as a file."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"log_messages",src:o(8851).A+"",width:"1266",height:"599"})})]})}function g(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},7902:(e,t,o)=>{o.d(t,{A:()=>s});const s=o.p+"assets/images/log_messages-6dd20c27f64fc00c8e61ee1062193fd6cb31efa4701130385c9853abfeed8495.png"},1530:(e,t,o)=>{o.d(t,{A:()=>s});const s=o.p+"assets/images/logs-bfc2ef93f6e60cb3bdf409aaaf0b4315b6e98dc1b9c17bdc171e67b416d884cc.png"},6567:(e,t,o)=>{o.d(t,{A:()=>s});const s=o.p+"assets/images/raw_tlm_logs-b293435cebbd5d4f04ab8a469ce2b4eb66f4cfd046d7b18ee417893336816b85.png"},8851:(e,t,o)=>{o.d(t,{A:()=>s});const s=o.p+"assets/images/script_messages-5c30dab8202ae3d18fa1f12cdd43f409967b1d4ac84a4a0e96bf027041ab9a07.png"},1184:(e,t,o)=>{o.d(t,{R:()=>i,x:()=>a});var s=o(4041);const n={},r=s.createContext(n);function i(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]);