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.1 KiB
HTML
30 lines
5.1 KiB
HTML
<a name="obs_03_0329"></a><a name="obs_03_0329"></a>
|
|
|
|
<h1 class="topictitle1">Configuring Access Logging for a Bucket</h1>
|
|
<div id="body1499758606807"><p id="obs_03_0329__p28293786">After logging is enabled for a bucket, OBS automatically converts bucket logs into objects following the naming rules and writes the objects into a target bucket.</p>
|
|
<div class="section" id="obs_03_0329__section7336713418"><h4 class="sectiontitle">Procedure</h4><ol id="obs_03_0329__ol52458695"><li id="obs_03_0329__li30717924101836"><span>In the bucket list, click the bucket you want to operate. The <strong id="obs_03_0329__obs_03_0307_b144421021120">Overview</strong> page is displayed.</span></li><li id="obs_03_0329__li18830181855820"><span>In the <strong id="obs_03_0329__b8424204161819">Basic Configurations</strong> area, click <strong id="obs_03_0329__b72721282265">Logging</strong>. The <strong id="obs_03_0329__b8323173412610">Logging</strong> dialog box is displayed.</span></li><li id="obs_03_0329__li57445188"><span>Select <strong id="obs_03_0329__b664291310163">Enable</strong>. For details, see <a href="#obs_03_0329__fig17700501192958">Figure 1</a>.</span><p><div class="fignone" id="obs_03_0329__fig17700501192958"><a name="obs_03_0329__fig17700501192958"></a><a name="fig17700501192958"></a><span class="figcap"><b>Figure 1 </b>Logging</span><br><span><img id="obs_03_0329__image913122152214" src="en-us_image_0130855314.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</p></li><li id="obs_03_0329__li199310841015"><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="obs_03_0329__li11116359191114"><span>Enter a prefix for the <strong id="obs_03_0329__b1013214416211">Log File Name Prefix</strong>.</span><p><p id="obs_03_0329__p101162592117">After logging is enabled, generated logs are named in the following format:</p>
|
|
<p id="obs_03_0329__p161169590114"><em id="obs_03_0329__i13116205971118"><Log File Name Prefix></em>YYYY-mm-DD-HH-MM-SS-<em id="obs_03_0329__i161162591113"><UniqueString></em></p>
|
|
<ul id="obs_03_0329__ul16116195910111"><li id="obs_03_0329__li5116135991118"><em id="obs_03_0329__i2560034149"><Log File Name Prefix></em> is the shared prefix of log file names.</li><li id="obs_03_0329__li9116105920117"><strong id="obs_03_0329__b17511842134510">YYYY-mm-DD-HH-MM-SS</strong> indicates when the log is generated.</li><li id="obs_03_0329__li1711611596116"><em id="obs_03_0329__i19552638132513"><UniqueString></em> indicates a character string generated by OBS.</li></ul>
|
|
<p id="obs_03_0329__p10116159191115">On OBS Console, if the configured <em id="obs_03_0329__i145914442109"><Log File Name Prefix></em> ends with a slash (/), logs generated in the bucket are stored in the <em id="obs_03_0329__i5741133118464"><Log File Name Prefix></em> folder in the bucket, facilitating the management of log files.</p>
|
|
<p id="obs_03_0329__p1511675981114">Example:</p>
|
|
<ul id="obs_03_0329__ul0116155913116"><li id="obs_03_0329__li12116195981110">If the bucket named <strong id="obs_03_0329__b184811348710">bucket</strong> is used to save log files, and the log file name prefix is set to <strong id="obs_03_0329__b13814257812">bucket-log/</strong>, all log files delivered to this bucket are saved in the <strong id="obs_03_0329__b22749457817">bucket-log</strong> folder. A log file is named as follows: <strong id="obs_03_0329__b1454341506171617">2015-06-29-12-22-07-N7MXLAF1BDG7MPDV</strong>.</li><li id="obs_03_0329__li10116135911117">If the bucket named <strong id="obs_03_0329__b56011330299">bucket</strong> is used to save log files, and the log file name prefix is set to <strong id="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="obs_03_0329__b783736649171726">bucket-log2015-06-29-12-22-07-N7MXLAF1BDG7MPDV</strong>.</li></ul>
|
|
</p></li><li id="obs_03_0329__li61938567"><span>Click <strong id="obs_03_0329__b172855383116057">OK</strong>.</span><p><p id="obs_03_0329__p938911496615">After logging is configured, you can view operation logs in the bucket that stores the logs in approximately fifteen minutes.</p>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="obs_03_0329__section112917292515"><h4 class="sectiontitle">Related Operations</h4><p id="obs_03_0329__p10198713132515">If you do not need to record logs, click <strong id="obs_03_0329__b674717141517">Disable</strong> in the <strong id="obs_03_0329__b2011256115915">Logging</strong> dialog box and then click <strong id="obs_03_0329__b187591430181515">OK</strong>. After logging is disabled, logs are not recorded, but existing logs in the target bucket will be retained.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0328.html">Logging</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |