首页 > 其他分享 >webman:配置端口/日志等(v1.5.7)

webman:配置端口/日志等(v1.5.7)

时间:2023-08-23 10:01:59浏览次数:38  
标签:www file webman workerman v1.5 https 日志 com

 

一,文档地址:

https://www.workerman.net/doc/webman/others/security.html
https://www.workerman.net/doc/webman/request.html
https://www.workerman.net/doc/webman/config.html

说明:刘宏缔的架构森林—专注it技术的博客,
网站:https://blog.imgtouch.com
原文: https://blog.imgtouch.com/index.php/2023/08/20/webman-pei-zhi-duan-kou-ri-zhi-deng-v1-5-7/
代码: https://github.com/liuhongdi/ 或 https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: [email protected]

二,配置文件:

config/server.php

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 <?php /**  * This file is part of webman.  *  * Licensed under The MIT License  * For full copyright and license information, please see the MIT-LICENSE.txt  * Redistributions of files must retain the above copyright notice.  *  * @author    walkor<[email protected]>  * @copyright walkor<[email protected]>  * @link      http://www.workerman.net/  * @license   http://www.opensource.org/licenses/mit-license.php MIT License  */   return [     'listen' => 'http://0.0.0.0:8787',     'transport' => 'tcp',     'context' => [],     'name' => 'webman',     'count' => cpu_count() * 4,     'user' => '',     'group' => '',     'reusePort' => false,     'event_loop' => '',     'stop_timeout' => 2,     'pid_file' => runtime_path() . '/webman.pid',     'status_file' => runtime_path() . '/webman.status',     'stdout_file' => runtime_path() . '/logs/stdout.log',     'log_file' => runtime_path() . '/logs/workerman.log',     'max_package_size' => 10 * 1024 * 1024 ];

说明一:各设置项的意义

listen: 配置ip地址和端口

count: 进程数量,默认是cpu数量x4

user/group: 新生成进程的用户和组

pid_file: 保存pid的文件

stdout_file: stdout保存在这个文件中,相当于调试开发时控制台上的输出内容

log_file: 启动停止等系统级的日志

max_package_size: 上传文件大小受到的限制,默认10M

说明二:

服务器配置config/server.php以及进程配置config/process.php不支持reload,需要restart重启才能生效

三,查看webman的版本:

liuhongdi@lhdpc:/data/webman/imageadmin$ composer show workerman/webman-framework
name     : workerman/webman-framework
descrip. : High performance HTTP Service Framework.
keywords : High Performance, http service
versions : * v1.5.7
...

标签:www,file,webman,workerman,v1.5,https,日志,com
From: https://www.cnblogs.com/architectforest/p/17650339.html

相关文章

  • webman:全局中间件:记录访问日志(v1.5.7)
    一,官方文档地址:https://www.workerman.net/doc/webman/middleware.html二,php代码1,配置中间件:config/middleware.php12345678910111213141516171819<?php/** *Thisfileispartofwebman. * *LicensedunderTheMITLicense......
  • webman:用thinkorm访问数据库(v1.5.7)
    一,官方文档地址:https://www.workerman.net/doc/webman/db/thinkorm.html二,安装组件liuhongdi@lhdpc:/data/webman/imageadmin$composerrequire-Wwebman/think-orm./composer.jsonhasbeenupdatedRunningcomposerupdatewebman/think-orm--with-all-dependencies......
  • webman:用thinkcache访问redis(v1.5.7)
    一,官方文档地址:https://www.workerman.net/doc/webman/db/thinkcache.html二,安装组件liuhongdi@lhdpc:/data/webman/imageadmin$composerrequire-Wwebman/think-cache三,配置redisconfig/thinkcache.php,按自己的实际情况配置12345678910111213......
  • webman:配置异常处理返回json格式(v1.5.7)
    一,添加一个除0错的异常代码:页面显示效果如图:二,配置:php代码1,config/123456789101112131415161718<?php/** *Thisfileispartofwebman. * *LicensedunderTheMITLicense *Forfullcopyrightandlicenseinformation......
  • 日志等级类
    日志等级类//日志等级类#ifndef__M_LEVEL_H__#define__M_LEVEL_H__namespacenmzlog{classLogLevel{public://日志等级用枚举类来表示,通过类来访问,避免枚举冲突//定义出系统所包含的全部日志等级,每一个项目中都会设置一个默认的日志输出等级......
  • 怎样做好日志分析?
    首先我们要知道日志分析是指检查并理解计算机生成的日志消息,例如日志事件或审计来跟踪记录,通过日志分析可以帮助您诊断和解决计算机系统中的问题,以及监视系统性能和安全性。如果您想知道您的网络中发生了什么,以便洞察潜在的威胁并在它们变成攻击之前阻止它们,那么您需要查看您的日......
  • Pytest allure中steps中添加日志
    是否在使用allure时,为了更好的定位问题,会把日志添加上去。类似如下的情行:#!/usr/bin/envpython#-*-coding:utf-8-*-#@Time:2023/7/189:12#@Author:huzq#@File:test_allure.pyimportloggingimportallureimportpytestLOG=logging.getLogger(......
  • idea 控制台日志乱码
    Help-->EditCustom-->VM-->Options,打开idea.vmoptions,文件位置:JetBrains\jetbra\vmoptions  在文件末尾添加:-Dfile.encoding=UTF-8 ......
  • K8s 日志高效查看神器!
    K8s日志高效查看神器!Escape K8S中文社区 2023-08-2119:57 发表于湖南通常情况下,在部署了 K8S 服务之后,为了更好地监控服务的运行情况,都会接入对应的日志系统来进行检测和分析,比如常见的 Filebeat+ElasticSearch+Kibana 这一套组合来完成。虽然该组合可以满......
  • 【Logging 日志库】Cpp 日志库 boost::log 以及 glog 的对比
    日志能方便地诊断程序原因、统计程序运行数据,是大型软件系统必不可少的组件之一。本文将从设计上和功能上对比C++语言常见的两款日志库:boost::log和google-glog。设计boost::log的设计主要有日志器(Logger)、日志核心(Loggingcore)、Sink前后端(frontend,backend)组......