Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Add default port to logplex_tcpsyslog_drain:uri
Browse files Browse the repository at this point in the history
  • Loading branch information
archaelus committed Jan 22, 2013
1 parent 81a970a commit 0892436
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/logplex_tcpsyslog_drain.erl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ valid_uri(#ex_uri{scheme="syslog",
valid_uri(_) ->
{error, invalid_tcpsyslog_uri}.

-spec uri(Host, Port) ->
#ex_uri{}
when Host :: iolist(),
Port :: 'undefined' | non_neg_integer().
uri(Host, undefined) ->
uri(Host, 514);
uri(Host, Port) when is_binary(Host), is_integer(Port) ->
uri(binary_to_list(Host), Port);
uri(Host, Port) when is_list(Host), is_integer(Port) ->
Expand Down

0 comments on commit 0892436

Please sign in to comment.