小编ncu*_*ian的帖子

如何使Nginx打印TCP流的完整日志

我使用具有以下配置的nginx-1.11.8。

stream {

    log_format  basic   '$time_iso8601 $remote_addr '
                        '$protocol $status $bytes_sent $bytes_received '
                        '$session_time $upstream_addr '
                        '"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';

    access_log      logs/stream.log  basic buffer=1k flush=5s;

    include *.stream.conf;
}
Run Code Online (Sandbox Code Playgroud)

现在,我只能在tcp日志中获取IP和其他不重要的内容。我想知道tcp数据包中与IP有关的一些重要信息。我应该怎么做才能在TCP日志中获取完整的TCP数据包?提前致谢。

logging tcp nginx stream

9
推荐指数
1
解决办法
3998
查看次数

如何修改Jenkins Git Build Data Revision显示远程repo地址

我有一个 Jenkins 管道,使用以下代码签出要构建的项目。

checkout([$class: 'GitSCM', branches: [[name: "*/develop"]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', noTags: false, reference: '', shallow: false],[$class: 'LocalBranch', localBranch: "**"]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'foobar', url: 'git@github.com:foo/bar.git']]])

构建完成后,点击构建记录。 在此处输入图片说明

与单击“状态”页面相同。 在此处输入图片说明

如何让 git Revision 显示远程仓库地址,例如 git@github.com:foo/bar.git/tree/develop,而不是 refs/remotes/origin/develop。 在此处输入图片说明

同样在 Git Build Data 页面中,如下所示。在此处输入图片说明在此处输入图片说明

提前致谢!

git revision jenkins

5
推荐指数
0
解决办法
660
查看次数

我无法使用 libcurl 获取 http 代码 404

当我使用错误的服务器地址(例如 127.0.0.1)作为 URL 的服务器地址发送 http 请求时,libcurl 返回 CURLE_OK 并获取 http 代码 0。但是,当我使用 IE 发送相同的请求时,我得到 http 代码 404 。有谁知道在发送这样的请求时如何使用 libcurl 获得错误代码而不是 0 。

c++ libcurl

1
推荐指数
1
解决办法
2479
查看次数

标签 统计

c++ ×1

git ×1

jenkins ×1

libcurl ×1

logging ×1

nginx ×1

revision ×1

stream ×1

tcp ×1