Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B27E0C4363A for ; Thu, 29 Oct 2020 15:48:51 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B84220790 for ; Thu, 29 Oct 2020 15:48:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="h+7b6HtV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B84220790 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4CMVGj34xWzDqZN for ; Fri, 30 Oct 2020 02:48:45 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=ratagupt@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=h+7b6HtV; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4CMVDy1HGnzDqVj for ; Fri, 30 Oct 2020 02:47:13 +1100 (AEDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09TFWMvu195617; Thu, 29 Oct 2020 11:47:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=to : from : subject : message-id : date : mime-version : content-type : content-transfer-encoding; s=pp1; bh=uDwFpqDoAT7G5E9hyfGzdIyxYy0O2DVqY7Gl8XM7Wt0=; b=h+7b6HtVUelKrQhtP7mNQwDkqDBWk7SRT6J9Wg+QL2McxyzWeLyCv2hf7GfRfR/9YFPR kW3F9rhMPAJChEks3MDaRsnG6NYKR2bpN8YLJ4qaTuYT8QdNvUc3t4md5+zIwbfxCX+H dorLayOc4tG7tNTs7i0BqmhsQpFRahkqKfuKPfsDWQYs0ZvfGTTUqA81ytrpFU1xn1W/ Eezj50O3DU401Q+7Nm/B8svNZ/apnUa+6c97D2M/CctZvos7WMFfFdBpB8M5lw1fFuP5 uICtAzD8rwtFMzKNH8aINwtzreEu7kp6TgP1X9zGW2zJUUyW7oevWQrpLCaicnzdrCbg pw== Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 34fyqrt20q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Oct 2020 11:47:10 -0400 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09TFiF4X011922; Thu, 29 Oct 2020 15:47:08 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma03fra.de.ibm.com with ESMTP id 34fpvrg9c1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Oct 2020 15:47:08 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09TFl6Ja34734370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Oct 2020 15:47:06 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EC3DFA4051; Thu, 29 Oct 2020 15:47:05 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 756AFA4053; Thu, 29 Oct 2020 15:47:05 +0000 (GMT) Received: from localhost.localdomain (unknown [9.77.193.97]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 29 Oct 2020 15:47:05 +0000 (GMT) To: Ed Tanous , "openbmc@lists.ozlabs.org" From: Ratan Gupta Subject: bmcweb logging Message-ID: <1d95c6ac-7341-d7dd-5154-fa6457b4c97c@linux.vnet.ibm.com> Date: Thu, 29 Oct 2020 21:17:04 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-10-29_08:2020-10-29, 2020-10-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=999 spamscore=0 impostorscore=0 phishscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010290109 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" Hi Ed, I was having issues in getting the logs from bmcweb repo, If I don't define the compiler flag(BMCWEB_ENABLE_LOGGING) then it doesn't get me any logs in journal(not even error log) and if I define the compiler flag then it gets too much debug info. Seems it happens because we have hardcoded the logelevel  and there is no way through which we can change except making the change manually in the following place. https://github.com/openbmc/bmcweb/blob/master/http/logging.hpp#L93 Suggestion is we can define another compile time flag for log level and use that log level at the above line for type of logging , by default logging should be enabled with error log level. If there is a need user can play with new compiler flag for more verbose logging. Am I missing something in usage of logging infra? Ratan