Commit Graph

2 Commits

Author SHA1 Message Date
John "Juce" Bruce
c232299f78 Allow CE CDM integrators to specify their own logging
This patch adds a new interface that partners must provide to
Cdm::initialize(), ILogger. ILogger replaces stderr as the sink to which
logging messages are sent. For partners that still want to log to
stderr, a reference implementation that logs to stderr is provided.

As a side-effect of this, many test-related source files had to be
updated to thread the new parameter to Cdm::initialize() through them.
This also necessitated adding a new variant of FormatString() that can
be called with a va_list directly so it can be called from other
functions that take varargs.

Bug: 201446862
Merged from https://widevine-internal-review.googlesource.com/177270

Change-Id: Ie31a10162773883b337f3a6144cf180a2b100139
2024-02-01 13:40:52 -08:00
John "Juce" Bruce
ff73463d0b Add String Formatting Util
(Merged from http://go/wvgerrit/160042.)

Since we don't have access to std::format yet, this patch adds a
function to wvutil to format text into a std::string.

Bug: 255466913
Test: x86-64
Test: raven
Change-Id: I28043da76af5b4772a29fa7e7241343caf9b54a1
2022-11-15 05:24:19 +00:00