Skip to content

Commit

Permalink
Add some missing method to LoggingHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
yyjdelete committed Apr 11, 2018
1 parent f227f95 commit 5370c02
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/DotNetty.Handlers/Logging/LoggingHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,48 @@ public override void ChannelRead(IChannelHandlerContext ctx, object message)
ctx.FireChannelRead(message);
}

public override void ChannelReadComplete(IChannelHandlerContext ctx)
{
if (this.Logger.IsEnabled(this.InternalLevel))
{
this.Logger.Log(this.InternalLevel, this.Format(ctx, "RECEIVED_COMPLETE"));
}
ctx.FireChannelReadComplete();
}

public override void ChannelWritabilityChanged(IChannelHandlerContext ctx)
{
if (this.Logger.IsEnabled(this.InternalLevel))
{
this.Logger.Log(this.InternalLevel, this.Format(ctx, "WRITABILITY", ctx.Channel.IsWritable));
}
ctx.FireChannelWritabilityChanged();
}

public override void HandlerAdded(IChannelHandlerContext ctx)
{
if (this.Logger.IsEnabled(this.InternalLevel))
{
this.Logger.Log(this.InternalLevel, this.Format(ctx, "HANDLER_ADDED"));
}
}
public override void HandlerRemoved(IChannelHandlerContext ctx)
{
if (this.Logger.IsEnabled(this.InternalLevel))
{
this.Logger.Log(this.InternalLevel, this.Format(ctx, "HANDLER_REMOVED"));
}
}

public override void Read(IChannelHandlerContext ctx)
{
if (this.Logger.IsEnabled(this.InternalLevel))
{
this.Logger.Log(this.InternalLevel, this.Format(ctx, "READ"));
}
ctx.Read();
}

public override Task WriteAsync(IChannelHandlerContext ctx, object msg)
{
if (this.Logger.IsEnabled(this.InternalLevel))
Expand Down

0 comments on commit 5370c02

Please sign in to comment.