Skip to content

Commit

Permalink
@W-13680300: remove logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoineausf committed Sep 28, 2023
1 parent 24ae653 commit c538c38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ else if ( protobuf )
res.getWriter().close();
}
else if (protobuf) {
LOG.info( "carbonapi request: formatting response" );
//LOG.info( "carbonapi request: formatting response" );
OutputStream output = res.getOutputStream();

List<MetricsResponse.Metric> metricList = new ArrayList<MetricsResponse.Metric>();
Expand All @@ -143,10 +143,10 @@ else if (protobuf) {
MetricsResponse.MetricList response =
MetricsResponse.MetricList.newBuilder().setName("FindResponse").addAllMetrics(metricList).build();

LOG.info( "carbonapi request: done formatting response " + response);
//LOG.info( "carbonapi request: done formatting response " + response);
try
{
LOG.info( "carbonapi request: writing response" );
//LOG.info( "carbonapi request: writing response" );
response.writeTo( output );
}
catch ( Exception e )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ protected void doGet( HttpServletRequest req, HttpServletResponse res )
}
else if ( protobuf )
{
LOG.info( "carbonapi request: found protobuf request" );
//LOG.info( "carbonapi request: found protobuf request" );
res.setContentType( "application/protobuf" );
// target = req.getParameter( "query" );
LOG.info( "carbonapi request: target from param: " + target + " --- blacklist: " + queryBlacklist );
//LOG.info( "carbonapi request: target from param: " + target + " --- blacklist: " + queryBlacklist );
}
else
{
Expand Down Expand Up @@ -152,22 +152,22 @@ else if ( protobuf )
}
else if ( protobuf )
{
LOG.info( "carbonapi request: processing request" );
//LOG.info( "carbonapi request: processing request" );
List<Series> seriesList = store.fetchSeriesData( new Query( target, Integer.parseInt( from ),
Integer.parseInt( until ), now, System.currentTimeMillis() ) );

LOG.info( "carbonapi request: formatting response" );
//LOG.info( "carbonapi request: formatting response" );
OutputStream output = res.getOutputStream();

List<MetricsResponse.Series> metricsSeriesList = new ArrayList<MetricsResponse.Series>();
LOG.info( "carbonapi request: setting values..." );
//LOG.info( "carbonapi request: setting values..." );
for ( Series series : seriesList )
{
MetricsResponse.Series.Builder metricsSeriesBuilder = MetricsResponse.Series.newBuilder()
.setName( series.name ).setStart( (int) series.start ).setEnd( (int) series.end ).setStep( (int) series.step );
for ( Double value : series.values )
{
LOG.info( String.format( "carbonapi request: found value [%s]",
//LOG.info( String.format( "carbonapi request: found value [%s]",
( value == null ? "null" : (double) value ) ) );
if ( value != null )
{
Expand All @@ -184,11 +184,11 @@ else if ( protobuf )
MetricsResponse.SeriesList response =
MetricsResponse.SeriesList.newBuilder().addAllSeriesList( metricsSeriesList ).build();

LOG.info( "carbonapi request: done formatting response " + response );
//LOG.info( "carbonapi request: done formatting response " + response );

try
{
LOG.info( "carbonapi request: writing response" );
//LOG.info( "carbonapi request: writing response" );
response.writeTo( output );
}
catch ( Exception e )
Expand Down

0 comments on commit c538c38

Please sign in to comment.