mirror of
https://git.yoctoproject.org/poky
synced 2026-09-12 15:49:36 +02:00
documentation: Rename of poky-ref-manual folder to ref-manual.
Changing the folder that holds the YP Reference Manual to be "ref-manual". This will help with confustion over the manual's intended purpose. (From yocto-docs rev: 1106442964b5080cb0b6b3bd3af32e9407c0f7c1) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
af19d889ef
commit
ed0a240e16
@@ -0,0 +1,47 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>2.3.7.2.<2E>Logging With Bash</title>
|
||||
<link rel="stylesheet" type="text/css" href="../book.css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
||||
<link rel="home" href="index.html" title="The Yocto Project Reference Manual">
|
||||
<link rel="up" href="recipe-logging-mechanisms.html" title="2.3.7.<2E>Recipe Logging Mechanisms">
|
||||
<link rel="prev" href="logging-with-python.html" title="2.3.7.1.<2E>Logging With Python">
|
||||
<link rel="next" href="usingpoky-debugging-others.html" title="2.3.8.<2E>Other Tips">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="section" title="2.3.7.2.<2E>Logging With Bash">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="logging-with-bash"></a>2.3.7.2.<2E>Logging With Bash</h4></div></div></div>
|
||||
<p>
|
||||
When creating recipes using Bash and inserting code that handles build
|
||||
logs you have the same goals - informative with minimal console output.
|
||||
The syntax you use for recipes written in Bash is similar to that of
|
||||
recipes written in Python described in the previous section.
|
||||
</p>
|
||||
<p>
|
||||
Following is an example written in Bash.
|
||||
The code logs the progress of the <code class="filename">do_my_function</code> function.
|
||||
</p>
|
||||
<pre class="literallayout">
|
||||
do_my_function() {
|
||||
bbdebug 2 "Running do_my_function"
|
||||
if [ exceptional_condition ]; then
|
||||
bbnote "Hit exceptional_condition"
|
||||
fi
|
||||
bbdebug 2 "Got to point xyz"
|
||||
if [ warning_trigger ]; then
|
||||
bbwarn "Detected warning_trigger, this might cause a problem later."
|
||||
fi
|
||||
if [ recoverable_error ]; then
|
||||
bberror "Hit recoverable_error, correcting"
|
||||
fi
|
||||
if [ fatal_error ]; then
|
||||
bbfatal "fatal_error detected"
|
||||
fi
|
||||
bbdebug 2 "Completed do_my_function"
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user