blob: f335d44d5d4e6eb7f2ff9b826d8323990262258a [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lamaa8e15a2014-02-11 23:30:06 -08002 * Copyright (c) 2012-2013 Qualcomm Atheros, Inc.
3 * All Rights Reserved.
4 * Qualcomm Atheros Confidential and Proprietary.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08005 */
Jeff Johnson295189b2012-06-20 16:38:30 -07006/**=========================================================================
7
8 \file pmmDebug.c
9
10 \brief implementation for log Debug related APIs
11
12 \author Sunit Bhatia
13
14 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
15
16 Qualcomm Confidential and Proprietary.
17
18 ========================================================================*/
19
Katya Nigam70d68332013-09-16 16:49:45 +053020#include "vos_trace.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070021#include "pmmDebug.h"
Katya Nigam70d68332013-09-16 16:49:45 +053022#define LOG_SIZE 256
Jeff Johnson295189b2012-06-20 16:38:30 -070023
Katya Nigam70d68332013-09-16 16:49:45 +053024void pmmLog(tpAniSirGlobal pMac, tANI_U32 loglevel, const char *pString, ...)
25 {
26 VOS_TRACE_LEVEL vosDebugLevel;
27 char logBuffer[LOG_SIZE];
28 va_list marker;
Jeff Johnson295189b2012-06-20 16:38:30 -070029
Katya Nigam70d68332013-09-16 16:49:45 +053030 /* getting proper Debug level */
31 vosDebugLevel = getVosDebugLevel(loglevel);
Jeff Johnson295189b2012-06-20 16:38:30 -070032
Katya Nigam70d68332013-09-16 16:49:45 +053033 /* extracting arguments from pstring */
34 va_start( marker, pString );
35 vsnprintf(logBuffer, LOG_SIZE, pString, marker);
36
37 VOS_TRACE(VOS_MODULE_ID_PMC, vosDebugLevel, "%s", logBuffer);
38 va_end( marker );
39 }