public class LogUtils extends Object
Centralized place for logging calls (as static methods). Everything is logged at
Level.INFO level unless otherwise specified.
CONTRACT NOTE: This class is ONLY concerned with logging. The rationale is: we are only concerned about things that are to be analyzed later by an external actor. We are journalists/chroniclers, not participants in the action.
We will only hold to the following conventions:The following things are true unless specified otherwise:
LOG_DATE_FORMAT.tab-separated.Campaign ID corresponds to ad ID.Creative ID corresponds to tag ID.This is opinionated in a sense that:
specified in
DelimLayout).LOG_ACCESS - just the access URLs. SeeLOG_BID - bids made (
logBid(OpenRtbRequest, long, String, String, String, Bid, int, int, ExchangeAdapter, String)
LOG_DEBUG_REQ debug companion to LOG_REQUESTLOG_ABTEST_ASSIGNMENT - status assignment for A/B-test made for Campaign
logExperimentCampaign(OpenRtbRequest, String, Ad, UserExperimentAttributes) or for
Targeting Strategy
logExperimentTargetingStrategy(OpenRtbRequest, String, Ad, UserExperimentAttributes)
LOG_REQUEST - all bid requests ( logRequest(OpenRtbRequest, boolean, int))
LOG_SESSION - same as LOG_REQUEST, but only for requests on which we bid.
URLs (see logRequest(OpenRtbRequest, boolean, int)).LOG_WIN - wins (this is responsible for knowing the winning price). This may or may
not be fired at the same time as
#logImpression(String, String, String, String, String, String, long, String, String, String, String, String, HttpServletRequest, String, int, String, URI, String, String, String, String, String, MultivaluedMap, boolean, String, String, String, boolean, String)
in cases where an exchange requires using NUrl mechanism (
BRX is one such example). See
logWin(String, String, String, String, String, String, String, double, long, long, long, String, String, String, String, String, HttpServletRequest, String, Long, String, URI, boolean, String, String, String, String, String, String, boolean, boolean, String)
LOG_PSEUDOWIN - pseudo-wins -- same as above but where authoritativeWin is
false
LOG_IMPRESSION - impressions. See
#logImpression(String, String, String, String, String, String, long, String, String, String, String, String, HttpServletRequest, String, int, String, URI, String, String, String, String, String, MultivaluedMap, boolean, String, String, String, boolean, String)
LOG_CLICK - clicks. See
logClick(String, String, String, String, String, String, String, String, String, String, HttpServletRequest, String, String, URI, String, String, String, String)
LOG_LOST- lost bids. See
logLost(Long, String, String, String, String, Long, Long, String, String, String, String, HttpServletRequest, String, String, String, String)
LOG_RESPONSE - entire bid response (
logResponse(OpenRtbRequest, OpenRtbResponse, Object))LOG_RAW_REQUEST - raw request as JSON. (
logRawRequest(OpenRtbRequest, Object, UriInfo))LOG_MAIN - free-form logging for troubleshooting. See:
Copyright © Enremmeta LLC 2014-2015. All Rights Reserved. This code is licensed under Affero GPL 3.0
DelimLayout,
Microput| Modifier and Type | Field and Description |
|---|---|
private static org.apache.logging.log4j.Logger |
abTestAssignmentLogger |
private static org.apache.logging.log4j.Logger |
accessLogger |
private static org.apache.logging.log4j.Logger |
bidLogger |
private static org.apache.logging.log4j.Logger |
clickLogger |
private static int |
CURRENT_LOG_VERSION_NUM |
private static org.apache.logging.log4j.Logger |
debugReqLogger |
private static org.apache.logging.log4j.Logger |
decisionLogger |
private static org.apache.logging.log4j.Logger |
impressionLogger |
static org.apache.logging.log4j.Logger |
jettyLogger |
static String |
LOG_ABTEST_ASSIGNMENT |
static String |
LOG_ACCESS
This is the "access" logger.
|
static String |
LOG_BID |
static String |
LOG_CLICK |
static SimpleDateFormat |
LOG_DATE_FORMAT
The log date format - human-readable date as "yyyy-MM-dd hh:mm:ss".
|
static String |
LOG_DEBUG_REQ
Fields from
LOG_REQUEST that are too long to keep there. |
static String |
LOG_DECISION |
static String |
LOG_IMPRESSION
Name for
Logger that logs data about impressions. |
static String |
LOG_JETTY |
static String |
LOG_LOST |
static String |
LOG_MAIN
This is the "main" logger.
|
static String |
LOG_PROUST |
static String |
LOG_PSEUDOWIN |
static String |
LOG_RAW_REQUEST
Raw requests, as JSON.
|
static String |
LOG_REDIR |
static String |
LOG_REQUEST |
static String |
LOG_RESPONSE
Full response, at
Level.DEBUG. |
static String |
LOG_SESSION |
static String |
LOG_TAG_DECISION |
static String |
LOG_URLS |
static String |
LOG_WIN |
private static org.apache.logging.log4j.Logger |
lostLogger |
private static org.apache.logging.log4j.Logger |
mainLogger |
static org.apache.logging.log4j.Marker |
MARKER_BCM
Marker for
BidCandidateManager. |
static org.apache.logging.log4j.Marker |
MARKER_BUDGET |
static org.apache.logging.log4j.Marker |
MARKER_WINLOSS |
private static org.apache.logging.log4j.Logger |
proustLogger |
private static org.apache.logging.log4j.Logger |
pseudowinLogger |
private static org.apache.logging.log4j.Logger |
rawRequestLogger |
private static org.apache.logging.log4j.Logger |
redirLogger |
private static org.apache.logging.log4j.Logger |
requestLogger |
private static org.apache.logging.log4j.Logger |
responseLogger |
private static AtomicLong |
seqBid |
private static AtomicLong |
seqImp |
private static AtomicLong |
seqLoss |
private static AtomicLong |
seqPseudoWin |
private static AtomicLong |
seqWin |
private static org.apache.logging.log4j.Logger |
sessionLogger |
private static org.apache.logging.log4j.Logger |
tagDecisionLogger |
private static org.apache.logging.log4j.Logger |
urlsLogger |
private static org.apache.logging.log4j.Logger |
winLogger |
| Constructor and Description |
|---|
LogUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
debug(org.apache.logging.log4j.Marker m,
Object msg) |
static void |
debug(Object msg)
Debug message.
|
static void |
debug(Object msg,
Throwable t)
Debug message.
|
static void |
error(Object msg) |
static void |
error(Object msg,
Throwable t) |
static void |
fatal(Object msg) |
static String |
getDate()
Formats current date with
LOG_DATE_FORMAT. |
static org.apache.logging.log4j.Logger |
getLogger(Class klass)
For command-line utilitiies
|
private static String |
getNodeId() |
static String |
getPhaseOfDecision(String decisionReason) |
private static String |
getRegion() |
static String |
getStepOfDecision(String decisionReason) |
static void |
info(org.apache.logging.log4j.Marker m,
Object msg) |
static void |
info(Object msg) |
static void |
info(Object msg,
Throwable t) |
static void |
init(Object o) |
static void |
logAccess(javax.ws.rs.core.UriInfo uriInfo) |
static void |
logAdLoadingError(long runNumber,
Object o,
String comment) |
private static Object |
logAt(org.apache.logging.log4j.Level curLevel,
org.apache.logging.log4j.Level expectedLevel,
Object msg)
Log at this level or a finer one.
|
static void |
logBid(OpenRtbRequest req,
long timeSpent,
String bidRequestId,
String userId,
String modUid,
Bid bid,
int candCount,
int bidCount,
ExchangeAdapter adapter,
String outcome)
Log a bid.
|
static void |
logClick(String xch,
String cookie,
String bId,
String iId,
String cId,
String crId,
String redir,
String ref,
String ua,
String xff,
javax.servlet.http.HttpServletRequest servletRequest,
String xrip,
String modUid,
URI uri,
String brId,
String ssp,
String cookies,
String originatingNodeId)
Log a click.
|
static void |
logDecision(long runNumber,
Ad ad,
String xch,
String type,
Long count,
Long total,
String comment)
Logs the following fields:
Current date (assume UTC)
Current timestamp (assume UTC)
run number of AdCache
Ad ID
Exchange
Decision type (e.g., Lot49Constants.DECISION_BROWSER)
"M1" as literal
Count
Total
Comment (clarifying "decision type")
M2 as literal
node ID
Region
Phase of decision (e.g., "02" from Lot49Constants.DECISION_BROWSER)
Step of decision (e.g., "11" from Lot49Constants.DECISION_BROWSER)
|
static void |
logExperimentCampaign(OpenRtbRequest req,
String modUid,
Ad ad,
UserExperimentAttributes exptAttributes)
Log an A/B-test assignment on Campaign.
|
static void |
logExperimentTargetingStrategy(OpenRtbRequest req,
String modUid,
Ad ad,
UserExperimentAttributes exptAttributes)
Log an A/B-test assignment on Targeting Strategy.
|
static void |
logImpression(String httpCookie,
String xch,
String bId,
String iId,
String cId,
String crId,
long bidCreatedTimestamp,
String redir,
String ref,
String ua,
String custom,
String xff,
javax.servlet.http.HttpServletRequest servletRequest,
String xrip,
int nurl,
String modUid,
URI uri,
String brId,
String ssp,
String forceCookieReset,
String forceCookieResync,
String cookies,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
boolean createCookie,
String exchangeCookie,
String origHttpCookie,
String cookieComment,
boolean suspicious,
String originatingNodeId,
BidInFlightInfo bif)
Log an impression.
|
static void |
logLost(Long bidSentOn,
String bId,
String iId,
String cId,
String crId,
Long microBid,
Long winningBid,
String reason,
String exchange,
String msg,
String xff,
javax.servlet.http.HttpServletRequest servletRequest,
String xrip,
String ssp,
String brId,
String originatingNodeId)
Log a lost bid.
|
static void |
logProust(String cookie,
String newCookie,
String xch,
String bId,
String iId,
String cId,
String crId,
String ref,
String ua,
String xff,
javax.servlet.http.HttpServletRequest servletRequest,
String xrip,
String modUid,
URI uri,
String brId,
String ssp,
String fcr,
String phase,
String redir,
String cookies,
String urlVersion,
String originatingNodeId)
Logs requests to
Proust. |
static void |
logRawRequest(OpenRtbRequest req,
Object origReq,
javax.ws.rs.core.UriInfo uriInfo)
Logs raw request, as JSON.
|
static void |
logRedir(String uriCalled,
String uriRedir,
int statusCode) |
static void |
logRequest(OpenRtbRequest req,
boolean didBid,
int candidates)
Log every
Impression request (could be multiple per actual bid
request). |
static void |
logResponse(OpenRtbRequest req,
OpenRtbResponse br,
Object response)
Logs the entire bid response to
LOG_RESPONSE. |
static void |
logResponse(String exchange,
String ssp,
String bidRequestId,
String bidId,
String tag) |
static void |
logTagDecision(long runNumber,
Tag tag,
String xch,
String type,
Long count,
Long total)
|
static void |
logWin(String cookie,
String xch,
String bId,
String iId,
String cId,
String crId,
String sentWinningPrice,
double winningCpm,
long microWinningPrice,
long microBidPrice,
long bidCreatedTimestamp,
String redir,
String ref,
String ua,
String custom,
String xff,
javax.servlet.http.HttpServletRequest servletRequest,
String xrip,
Long nurlId,
String modUid,
URI uri,
boolean authoritativeWin,
String brId,
String ssp,
String notFoundReason,
String clickThroughMacroValue,
String clickThroughEncodedMacroValue,
String cookies,
boolean createCookie,
boolean suspiciousWin,
String originatingNodeId)
Similar to
#logImpression(String, String, String, String, String, String, long, String, String, String, String, String, HttpServletRequest, String, int, String, URI, String, String, String, String, String, MultivaluedMap, boolean, String, String, String, boolean, String)
except that:
The four columns after crId are not null but carry pricing information,
as follows:
Winning price as sent by the exchange (prior to it being decoded by the method specific
to the exchange)
Decoded winning price as CPM
Decoded winning price as micro$
Bid price, as micro$
Instead of nurl column, here we have nurlId column.
All columns up to 35 ("M5") are otherwise the same. |
static void |
trace(org.apache.logging.log4j.Marker m,
Object msg) |
static void |
trace(Object msg) |
static void |
trace(Object msg,
Throwable t) |
static void |
warn(Object msg) |
static void |
warn(Object msg,
Throwable t) |
private static String |
wrapMsg(Object msg) |
public static final org.apache.logging.log4j.Marker MARKER_BUDGET
public static final org.apache.logging.log4j.Marker MARKER_BCM
BidCandidateManager.public static final String LOG_JETTY
public static final org.apache.logging.log4j.Logger jettyLogger
private static final int CURRENT_LOG_VERSION_NUM
public static final String LOG_BID
private static final org.apache.logging.log4j.Logger bidLogger
public static final String LOG_ABTEST_ASSIGNMENT
private static final org.apache.logging.log4j.Logger abTestAssignmentLogger
public static final String LOG_CLICK
private static final org.apache.logging.log4j.Logger clickLogger
public static final SimpleDateFormat LOG_DATE_FORMAT
public static final String LOG_IMPRESSION
Logger that logs data about impressions.#logImpression(String, String, String, String, String, String, long, String, String,
String, String, String, HttpServletRequest, String, int, String, URI, String, String,
String, String, String, MultivaluedMap, boolean, String, String, String, boolean,
String),
Constant Field Valuesprivate static final org.apache.logging.log4j.Logger impressionLogger
public static final String LOG_WIN
private static final org.apache.logging.log4j.Logger winLogger
public static final String LOG_PSEUDOWIN
private static final org.apache.logging.log4j.Logger pseudowinLogger
public static final String LOG_LOST
private static final org.apache.logging.log4j.Logger lostLogger
public static final String LOG_MAIN
private static final org.apache.logging.log4j.Logger mainLogger
public static final String LOG_ACCESS
private static final org.apache.logging.log4j.Logger accessLogger
public static final String LOG_REQUEST
private static final org.apache.logging.log4j.Logger requestLogger
LOG_REQUESTpublic static final String LOG_DEBUG_REQ
LOG_REQUEST that are too long to keep there. At DEBUG level only.private static final org.apache.logging.log4j.Logger debugReqLogger
LOG_DEBUG_REQpublic static final String LOG_REDIR
private static final org.apache.logging.log4j.Logger redirLogger
public static final String LOG_DECISION
private static final org.apache.logging.log4j.Logger decisionLogger
public static final String LOG_TAG_DECISION
private static final org.apache.logging.log4j.Logger tagDecisionLogger
public static final String LOG_RESPONSE
Level.DEBUG.private static final org.apache.logging.log4j.Logger responseLogger
public static final String LOG_RAW_REQUEST
logRawRequest(OpenRtbRequest, Object, UriInfo). Only
available when log level is Level.DEBUG.private static final org.apache.logging.log4j.Logger rawRequestLogger
public static final String LOG_PROUST
private static final org.apache.logging.log4j.Logger proustLogger
public static final String LOG_SESSION
private static final org.apache.logging.log4j.Logger sessionLogger
public static final String LOG_URLS
private static final org.apache.logging.log4j.Logger urlsLogger
public static final org.apache.logging.log4j.Marker MARKER_WINLOSS
private static final AtomicLong seqImp
private static final AtomicLong seqWin
private static final AtomicLong seqPseudoWin
private static final AtomicLong seqLoss
private static final AtomicLong seqBid
public static void init(Object o)
public static final org.apache.logging.log4j.Logger getLogger(Class klass)
klass - the class of loggerpublic static void debug(Object msg)
public static void trace(Object msg)
public static void debug(org.apache.logging.log4j.Marker m,
Object msg)
public static void trace(org.apache.logging.log4j.Marker m,
Object msg)
public static void error(Object msg)
public static void fatal(Object msg)
public static void logDecision(long runNumber,
Ad ad,
String xch,
String type,
Long count,
Long total,
String comment)
Current date (assume UTC)Current timestamp (assume UTC)AdCacheAd IDLot49Constants.DECISION_BROWSER)node IDLot49Constants.DECISION_BROWSER)Lot49Constants.DECISION_BROWSER)public static void logTagDecision(long runNumber,
Tag tag,
String xch,
String type,
Long count,
Long total)
logDecision(long, Ad, String, String, Long, Long, String). Logs the
following: *
Current date (assume UTC)Current timestamp (assume UTC)AdCacheAd IDTag IDLot49Constants.TAG_DECISION_API)node IDpublic static final String getDate()
LOG_DATE_FORMAT.public static void info(Object msg)
public static void info(org.apache.logging.log4j.Marker m,
Object msg)
public static void logAccess(javax.ws.rs.core.UriInfo uriInfo)
private static final String getNodeId()
private static final String getRegion()
public static void logBid(OpenRtbRequest req, long timeSpent, String bidRequestId, String userId, String modUid, Bid bid, int candCount, int bidCount, ExchangeAdapter adapter, String outcome)
LOG_BID.
Current date (assume UTC)Current time stampbid request IDUser IDbid IDimpression IDcampaign ID - we define this to be targeting ID
creative ID - we define this to be tag IDBidCandidateManager.Exchangebid choice algoleft to make in this periodwe were originally supposed to make in
this periodnode IDseqBid sequential number of bid per node (see above)Ad.getAdVersion() version of the AdTag.getTagVersion() version of the TagLot49Constants.BID_OUTCOME_SUBMITTED, @link
Lot49Constants.BID_OUTCOME_INTERNAL_AUCTION_LOSS, @link
Lot49Constants.BID_OUTCOME_CONTROL.
userId - User.getBuyeruid()Utils.microToCpm(double),
Utils.cpmToMicro(double)public static void logExperimentCampaign(OpenRtbRequest req, String modUid, Ad ad, UserExperimentAttributes exptAttributes)
LOG_ABTEST_ASSIGNMENT.
Current date (assume UTC)Current time stampbid request IDUser IDUtils.cookieToLogModUid(String)Campaign idCampaign idregion )req - Request OpenRtbRequestmodUid - Cookie as decoded by Utils.cookieToLogModUid(String) of assigned userad - Targeting Strategy of a Campaign under ExperimentAdexptAttributes - Experiment Attributes for user UserExperimentAttributeslogExperimentTargetingStrategy(OpenRtbRequest, String, Ad, UserExperimentAttributes)public static void logExperimentTargetingStrategy(OpenRtbRequest req, String modUid, Ad ad, UserExperimentAttributes exptAttributes)
LOG_ABTEST_ASSIGNMENT.
Current date (assume UTC)Current time stampbid request IDUser IDUtils.cookieToLogModUid(String)Targeting strategy IDregion )req - Request OpenRtbRequestmodUid - Cookie as decoded by Utils.cookieToLogModUid(String) of assigned userad - Targeting Strategy under ExperimentAdexptAttributes - Experiment Attributes for user UserExperimentAttributespublic static void logClick(String xch, String cookie, String bId, String iId, String cId, String crId, String redir, String ref, String ua, String xff, javax.servlet.http.HttpServletRequest servletRequest, String xrip, String modUid, URI uri, String brId, String ssp, String cookies, String originatingNodeId)
USER_ID_COOKIE configuration parameter.Bid IDImpression IDRTB's Campaign ID - same as Ad.getId()Bid.getCrid() RTB's Creative ID) - same as Tag.getId()ServletRequest.getRemoteHost()ServletRequest.getRemotePort()ServletRequest.getRemoteAddr()Geo.getCity()Geo.getRegion()Geo.getZip()Geo.getMetro()Geo.getCountry()Utils.cookieToLogModUid(String)Bid request IDNode ID that originated the bid resulting in this click
Node ID of this serverAd.getAdVersion() version of the AdTag.getTagVersion() version of the Tagpublic static void logImpression(String httpCookie, String xch, String bId, String iId, String cId, String crId, long bidCreatedTimestamp, String redir, String ref, String ua, String custom, String xff, javax.servlet.http.HttpServletRequest servletRequest, String xrip, int nurl, String modUid, URI uri, String brId, String ssp, String forceCookieReset, String forceCookieResync, String cookies, javax.ws.rs.core.MultivaluedMap<String,String> headers, boolean createCookie, String exchangeCookie, String origHttpCookie, String cookieComment, boolean suspicious, String originatingNodeId, BidInFlightInfo bif)
LOG_IMPRESSION:
Current date (assume UTC)Current timestamp (assume UTC)Bid.getId())Bid.getImpid())Bid.getCid())Bid.getCrid())logWin(String, String, String, String, String, String, String, double, long, long, long, String, String, String, String, String, HttpServletRequest, String, Long, String, URI, boolean, String, String, String, String, String, String, boolean, boolean, String)
Tag.getCustomImpPassThruData()) (and a marker - literal "M4" after).ServletRequest.getRemoteHost()ServletRequest.getRemotePort()ServletRequest.getRemoteAddr() -- which is user's, unless we have something
in front like NGINX or ELB, in which case it's kind of useless, it's theirslooked up from itGeo.getCity()Geo.getRegion()Geo.getZip()Geo.getMetro()Geo.getCountry()Utils.cookieToLogModUid(String)node ID of selfseqImp)region )Ad.getAdVersion() version of the AdTag.getTagVersion() version of the TagStatsSvc.impression(UriInfo, String, String, String, String, String, String, String,
String, String, long, String, int, String, String, String, String, String, String,
String, HttpServletRequest, String, javax.ws.rs.core.HttpHeaders, String, String),
StatsSvc#nurl(UriInfo, String, String, String, String, String, String, String, String,
String, String, long, String, String, String, String, String, String,
HttpServletRequest, String, String, String, String, String),
logWin(String, String, String, String, String, String, String, double, long, long,
long, String, String, String, String, String, HttpServletRequest, String, Long, String,
URI, boolean, String, String, String, String, String, String, boolean, boolean, String)public static void logProust(String cookie, String newCookie, String xch, String bId, String iId, String cId, String crId, String ref, String ua, String xff, javax.servlet.http.HttpServletRequest servletRequest, String xrip, String modUid, URI uri, String brId, String ssp, String fcr, String phase, String redir, String cookies, String urlVersion, String originatingNodeId)
Proust.public static void logWin(String cookie, String xch, String bId, String iId, String cId, String crId, String sentWinningPrice, double winningCpm, long microWinningPrice, long microBidPrice, long bidCreatedTimestamp, String redir, String ref, String ua, String custom, String xff, javax.servlet.http.HttpServletRequest servletRequest, String xrip, Long nurlId, String modUid, URI uri, boolean authoritativeWin, String brId, String ssp, String notFoundReason, String clickThroughMacroValue, String clickThroughEncodedMacroValue, String cookies, boolean createCookie, boolean suspiciousWin, String originatingNodeId)
#logImpression(String, String, String, String, String, String, long, String, String, String, String, String, HttpServletRequest, String, int, String, URI, String, String, String, String, String, MultivaluedMap, boolean, String, String, String, boolean, String)
except that:
ExchangeAdapter.trueWinOnNurlOrImpression().Bid Request IDExchangeAdapter.isMacrosInNurl()).
ExchangeAdapter.isMacrosInNurl()).node ID of selfnext win sequence numberregionAd.getAdVersion() version of the AdTag.getTagVersion() version of the TagLostAuctionTask.cancelLostAuctionTask(String, BidInFlightInfo),
StatsSvc#nurl(UriInfo, String, String, String, String, String, String, String, String,
String, String, long, String, String, String, String, String, String,
HttpServletRequest, String, String, String, String, String),
StatsSvc.impression(UriInfo, String, String, String, String, String, String, String,
String, String, long, String, int, String, String, String, String, String, String,
String, HttpServletRequest, String, javax.ws.rs.core.HttpHeaders, String, String)public static void logLost(Long bidSentOn, String bId, String iId, String cId, String crId, Long microBid, Long winningBid, String reason, String exchange, String msg, String xff, javax.servlet.http.HttpServletRequest servletRequest, String xrip, String ssp, String brId, String originatingNodeId)
winTimeout time, or when we explicitly were told
that the bid was lost. The following information is logged to LOG_LOST:
current date (assume UTC)Current timestamp (assume UTC)
Bid.getId())Bid.getImpid())Bid.getCid())Bid.getCrid())ServletRequest.getRemoteHost() from parameter servletRequest, which
is user's, unless we have something in front like NGINX or ELB, in which case it's kind of
useless, it's theirs.ServletRequest.getRemotePort() dittoServletRequest.getRemoteAddr(), dittocity based on MaxMind lookup from
xripregion, dittozip, dittometro, dittocountry, dittobid request IDnode IDregion of the nodepublic static void logResponse(OpenRtbRequest req, OpenRtbResponse br, Object response)
LOG_RESPONSE. Logged at Level.DEBUG debug
level.public static void logResponse(String exchange, String ssp, String bidRequestId, String bidId, String tag)
public static final void logRawRequest(OpenRtbRequest req, Object origReq, javax.ws.rs.core.UriInfo uriInfo)
bid request IDOpenRtbRequest, our internal formatOpenRtbRequest) converted to JSONLOG_RAW_REQUESTpublic static void logRequest(OpenRtbRequest req, boolean didBid, int candidates)
Log every Impression request (could be multiple per actual bid
request). Note that not all fields are logged at all levels. Check the documentation per
field. When not otherwise specified, everything here applies to INFO level.
request log which has hashed URLs (per standard business agreements
with publishers and exchanges that this information cannot be shared with third parties)URL log where actual URLs and their hashes are stored which can be
referred to hashed URLs from the above one (per standard business agreements with publishers
and exchanges that this information cannot be shared with third parties)debug request log which has extra information useful for
debugging.LOG_REQUEST
is now written to LOG_SESSION. The other files are not written at this point.
The following fields are logged, in this order (remember that any null or empty
field is logged as DelimLayout.getNullChar()).
Current date in human-readable format. We are always assuming this to
be in UTC.Unix epoch time. We are always assuming this to be in
UTC.openx).Bid request IDImpression IDOur cookie, after corrections. See below for original version.
Exchange's user IDCustom data we synced with Exchange on userUser segments, encrypted with
Lot49Config.getLogKey(), or plain text if that is null or empty.city based on Device.getGeo()region/state/province based on Device.getGeo()zip/postal code based on Device.getGeo()latitude based on Device.getGeo()longitude based on Device.getGeo()metro code based on Device.getGeo()city based on userregion/state/province based on userzip/postal code based on userlatitude based on userlongitude based on usermetro code based on usercity based on our own lookupregion/state/province based on our own lookupzip/postal code based on our own lookup
latitude based on our own lookuplongitude based on our own lookupmetro code based on our own lookupGender (per Exchange's opinion)IP address of the userUser-agent of the user's browserMake of user's deviceModel of user's deviceOS of user's deviceOS version of user's deviceLanguage of a user's deviceDomainCategories for siteKeywords for siteNamePage URLPage categoryContent categoriesContent keywordsContent languageBanner.getMimes() or Video.getMimes())Video.getApi() or Banner.getApi()
linearityprotocolsmin durationmax durationX-Forwarded-For header valueCountry from DeviceCountry from UserCountry looked up by usSection categoriestimezoneuser's domainuser's ISPorganizationconnection typetest?User-data stored at Exchange and passed to us.Lot49CustomData.getUid()BidCandidateManager, that is, how
many ads we are considering eligible for this request, pending data request.Lot49Ext.getRealIpHeader()Lot49Ext.getRemoteHost()Lot49Ext.getRemotePort()Lot49Ext.getRemoteAddr()ext object as isUser's Unix timestampUser's day of weekBidder's day of weekUser's hourBidder's hourUser's timestamp as stringaggregator, or same as exchange).bid choice algobrowser namebrowser familythird party provider informationskyhook categorieswhether SSL was requiredexcluded markups, as a list (see MarkupType
).Bid floorcookie.other region namesPrivate deals infonode IDregion of the nodeApp nameApp bundle IDLOG_URLS is written with the following fields:
Current date in human-readable format. We are always assuming this to
be in UTC.Unix epoch time. We are always assuming this to be in
UTC.aggregator, or same as exchange).Our cookieExchange's user IDCustom data we synced with Exchange on usercookie.LOG_DEBUG_REQ is written with following fields:
Current date in human-readable format. We are always assuming this to
be in UTC.Unix epoch time. We are always assuming this to be in
UTC.Bid request IDImpression IDoptout reasonscommentsprivate static final Object logAt(org.apache.logging.log4j.Level curLevel, org.apache.logging.log4j.Level expectedLevel, Object msg)
public static void warn(Object msg)