forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
30 lines
5.8 KiB
HTML
30 lines
5.8 KiB
HTML
<a name="en-us_topic_0045853744"></a><a name="en-us_topic_0045853744"></a>
|
|
|
|
<h1 class="topictitle1">Configuring Logging</h1>
|
|
<div id="body8662426"><p id="en-us_topic_0045853744__p16911746506">After logging is enabled for a bucket, OBS automatically converts the bucket's logs into an object in a fixed naming format and then writes the object to the specified bucket.</p>
|
|
<div class="section" id="en-us_topic_0045853744__sfe45c5a333f549f48ff1e9ba2d1e8454"><h4 class="sectiontitle">Prerequisites</h4><p id="en-us_topic_0045853744__a07a271eb678f4753b386d76b089fe5d2">The log delivery user group has the write and ACL view permissions for the destination bucket. For details, see <a href="en-us_topic_0045853509.html">Configuring a Bucket ACL</a>.</p>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0045853744__sd4f53f6d914a46f2a0f751184bad7fcf"><h4 class="sectiontitle">Procedure</h4><ol id="en-us_topic_0045853744__o4a38afeb7a1041b8860750d2a104270b"><li id="en-us_topic_0045853744__l32aaed7801d74f8aa0d5db46f638f1ea"><span>Log in to OBS Browser.</span></li><li id="en-us_topic_0045853744__li277420158506"><span>Click the blank area in the row of the bucket for which you want to configure logging and choose <strong id="en-us_topic_0045853744__b860214296551">More</strong> > <strong id="en-us_topic_0045853744__b14630133416559">Configure Logging</strong>.</span></li><li id="en-us_topic_0045853744__l06b848bcccf446a993374247af410276"><span>Select <strong id="en-us_topic_0045853744__b162984261156">Enable</strong>. See <a href="#en-us_topic_0045853744__fig5791779717938">Figure 1</a>.</span><p><div class="fignone" id="en-us_topic_0045853744__fig5791779717938"><a name="en-us_topic_0045853744__fig5791779717938"></a><a name="fig5791779717938"></a><span class="figcap"><b>Figure 1 </b>Configuring logging</span><br><span><img id="en-us_topic_0045853744__image8941105553011" src="en-us_image_0129837880.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</p></li><li id="en-us_topic_0045853744__li375116179585"><span>Select an existing bucket where you want to store log files. Log delivery users of the selected bucket will be automatically granted the permissions to read the bucket ACL and write logs to the bucket.</span></li><li id="en-us_topic_0045853744__li12160434593"><span>Enter a prefix for the <strong id="en-us_topic_0045853744__obs_03_0329_b1013214416211">Log File Name Prefix</strong>.</span><p><p id="en-us_topic_0045853744__obs_03_0329_p101162592117">After logging is enabled, generated logs are named in the following format:</p>
|
|
<p id="en-us_topic_0045853744__obs_03_0329_p161169590114"><em id="en-us_topic_0045853744__obs_03_0329_i13116205971118"><Log File Name Prefix></em>YYYY-mm-DD-HH-MM-SS-<em id="en-us_topic_0045853744__obs_03_0329_i161162591113"><UniqueString></em></p>
|
|
<ul id="en-us_topic_0045853744__obs_03_0329_ul16116195910111"><li id="en-us_topic_0045853744__obs_03_0329_li5116135991118"><em id="en-us_topic_0045853744__obs_03_0329_i2560034149"><Log File Name Prefix></em> is the shared prefix of log file names.</li><li id="en-us_topic_0045853744__obs_03_0329_li9116105920117"><strong id="en-us_topic_0045853744__obs_03_0329_b17511842134510">YYYY-mm-DD-HH-MM-SS</strong> indicates when the log is generated.</li><li id="en-us_topic_0045853744__obs_03_0329_li1711611596116"><em id="en-us_topic_0045853744__obs_03_0329_i19552638132513"><UniqueString></em> indicates a character string generated by OBS.</li></ul>
|
|
<p id="en-us_topic_0045853744__obs_03_0329_p10116159191115">On OBS Console, if the configured <em id="en-us_topic_0045853744__obs_03_0329_i145914442109"><Log File Name Prefix></em> ends with a slash (/), logs generated in the bucket are stored in the <em id="en-us_topic_0045853744__obs_03_0329_i5741133118464"><Log File Name Prefix></em> folder in the bucket, facilitating the management of log files.</p>
|
|
<p id="en-us_topic_0045853744__obs_03_0329_p1511675981114">Example:</p>
|
|
<ul id="en-us_topic_0045853744__obs_03_0329_ul0116155913116"><li id="en-us_topic_0045853744__obs_03_0329_li12116195981110">If the bucket named <strong id="en-us_topic_0045853744__obs_03_0329_b184811348710">bucket</strong> is used to save log files, and the log file name prefix is set to <strong id="en-us_topic_0045853744__obs_03_0329_b13814257812">bucket-log/</strong>, all log files delivered to this bucket are saved in the <strong id="en-us_topic_0045853744__obs_03_0329_b22749457817">bucket-log</strong> folder. A log file is named as follows: <strong id="en-us_topic_0045853744__obs_03_0329_b1454341506171617">2015-06-29-12-22-07-N7MXLAF1BDG7MPDV</strong>.</li><li id="en-us_topic_0045853744__obs_03_0329_li10116135911117">If the bucket named <strong id="en-us_topic_0045853744__obs_03_0329_b56011330299">bucket</strong> is used to save log files, and the log file name prefix is set to <strong id="en-us_topic_0045853744__obs_03_0329_b186011030293">bucket-log</strong>, all log files are saved in the root directory of the bucket. A log file is named as follows: <strong id="en-us_topic_0045853744__obs_03_0329_b783736649171726">bucket-log2015-06-29-12-22-07-N7MXLAF1BDG7MPDV</strong>.</li></ul>
|
|
</p></li><li id="en-us_topic_0045853744__li115551710143313"><span>Click <strong id="en-us_topic_0045853744__b6404103912714">OK</strong>.</span></li><li id="en-us_topic_0045853744__li944717573486"><span>In the displayed dialog box, click <strong id="en-us_topic_0045853744__obs_03_0022_b19371431195919">Close</strong> to close the dialog box.</span></li></ol>
|
|
<p id="en-us_topic_0045853744__p6951181413581"></p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0430.html">Logging</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |