我想从root karaf日志中排除我的捆绑包。此捆绑包发出的JSON太大,日志不再可以重新编辑。
我想我应该改变osgi:*行:
<div ng-cell="">
<div class="inCell ng-scope">
<div class="cellDarkGray" ng2-class="{cellDarkGray: (row.getProperty('returnedRecordsNumber') != '0'),cellDarkGray: (row.getProperty('activityid') != '0'),cellDarkGray: (row.getProperty('returnedRecordsNumber') != '0')}">
<div class="cellOrange" ng-class="{cellRed: (row.getProperty('Impact') == '0'),cellOrange: (row.getProperty('activityid') != '0'), cellBlue: (row.getProperty('Impact') == '2')}"/>
<div class="cellWhite">
<div style="height:60px">
<div class="ng-hide" ng-show="(row.getProperty('commentFlag')== true) && (userRole =='ROLE_2') ">
<div class="ng-hide" ng-show="(row.getProperty('commentFlag')== true) && (userRole =='ROLE_1') ">
</div>
<div class="inCellData">
<div class="line1" ng-click="openDetails(row,'viewDetail')">
<span class="title1 ng-binding" ng-hide="row.getProperty('planned_typ')== 'NULL'">ORANGE PLANNED MAINTENANCE - </span>
<span class="title2 ng-binding" ng-hide="row.getProperty('deviceid')== 'NULL'"> BLCY810</span>
<!-- <span ng-hide="row.getProperty('myRouterName')== ''"> ||{{row.getProperty('myRouterName')}} ||</span> -->
</div>
<div class="line2">
<span class="title3"/>
<span class="ng-binding" ng-hide="row.getProperty('service_impact')== ''"> 1 - 5 MINS ||</span>
<span class="title3 ng-binding">09/JUN/2017 01:30:00 AM</span>
up to
<span class="title2 ng-binding">09/JUN/2017 03:30:00 AM</span>
||
<span class="ng-binding">EQUANT SHARED NETWORK</span>
</div>
<div class="line3">
</div>
<div>
<nav id="cbp-spmenu-s1" class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left cbp-spmenu-open">
<a ng-click="openDetails(row,'viewDetail')">view details</a>
<div class="" ng-show="userRole =='ROLE_1'">
<a class="" ng-show="row.getProperty('internalFlag')=='Y'" ng-click="setUnsetInternal(row)">invisible to customer</a>
<a class="ng-hide" ng-show="row.getProperty('internalFlag')=='Z'" ng-click="row.getProperty('sourcesystem')=='Carrier Changes' && (row.getProperty('urgency')=='EMERGENCY' || row.getProperty('urgency')=='EXPEDITE') ? alertPastDataZEmergency() : alertPastDataZ() ">invisible to customer</a>
<a class="ng-hide" ng-show="row.getProperty('internalFlag')=='N'" ng-click="setUnsetInternal(row)">visible to customer</a>
<a class="ng-hide" ng-show="row.getProperty('internalFlag')=='X' || row.getProperty('internalFlag')=='H'" ng-click="alertPastDataX()">visible to customer</a>
</div>
<!-- Prod Consol Start -->
<a ng-show="userRole =='ROLE_1'" ng-click="openDetails(row, 'comment')">add a comment</a>
<!-- Prod Consol End -->
</nav>
</div>
</div>
</div>
我应该把它放在哪个值?
编辑,问题比我想象的要复杂得多。
JSON通过org.apache.cxf.cxf-rt-features-logging在日志中注入。它也被其他捆绑使用。我希望只删除我的捆绑包发送和接收的JSON。
我该怎么做?
答案 0 :(得分:0)
如果要从日志记录中排除特定的捆绑包,只需在pax日志记录配置中关闭捆绑包的日志记录。
log4j.logger.mybundle = OFF
如果您想微调CXF消息记录,请检查http://cxf.apache.org/docs/message-logging.html。
有些注意事项:
记录器名称为.. karaf默认情况下仅将其剪切为类型。 很多细节都在MDC值中 您需要更改pax日志记录配置以使其可见。
您可以使用记录器名称来微调您想要以这种方式记录的服务。例如,将调试级别设置为WARN以获得噪声 服务以避免记录它们或将某些服务记录到另一个服务 文件。