'zsh: no matches found: uvicorn[standard]
I am following the example to install unvicorn:
https://www.uvicorn.org/
by doing:
pip install uvicorn[standard]
But received the following error:
% pip install uvicorn[standard]
zsh: no matches found: uvicorn[standard]
However this works:
% pip install uvicorn
I am on MacPro with Python 3.7.
Solution 1:[1]
You need to use single quotes.
pip install 'uvicorn[standard]'
Solution 2:[2]
zsh uses square brackets for globbing / pattern matching.
So, if you need to pass literal square brackets as an argument to a command, you either need to escape them or quote the argument like this:
pip install 'uvicorn[standard]'
If you want to disable globbing for the pip command permanently, you can do so by adding this to your ~/.zshrc:
alias pip='noglob pip'
Solution 3:[3]
For zsh you can configure it to just run the command without trying to do any glob expansion when there are no files to match:
unsetopt nomatch
Solution 4:[4]
Remark: Spring Boot already defines a log file with rotation (cf. log4j2-file.xml) with a size limit of 10 MiB (the limit is hardcoded). You just need to set:
logging.file.path=D:\\Users\\User\\MyFiles\\Apache Camel github\\ChatServiceProject\\logs
logging.file.name=propertieslogs.log
in your application.properties.
If, however, you want to write your own configuration file, you should consider using the XML format:
<Properties>
<Property name="LOG_PATH">D:\Users\User\MyFiles\Apache Camel github\ChatServiceProject\logs</Property>
<Property name="LOG_FILE">${sys:LOG_PATH}/propertieslogs.log</Property>
</Properties>
<Appenders>
<RollingFile
name="LOGFILE"
append="true"
fileName="${sys:LOG_FILE}"
filePattern="${sys:LOG_PATH}/propertieslogs.%i.log.gz">
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n" />
<SizeBasedTriggeringPolicy size="1 KB" />
</RollingFile>
</Appenders>
The properties format uses a lot of arbitrary identifiers to emulate the hierarchical structure of XML:
property.LOG_PATH=D:\Users\User\MyFiles\Apache Camel github\ChatServiceProject\logs
property.LOG_FILE=${sys:LOG_PATH}/propertieslogs.log
appender.<id1>.type=RollingFile
appender.<id1>.name=LOGFILE
appender.<id1>.append=true
appender.<id1>.fileName=${sys:LOG_FILE}
appender.<id1>.filePattern=${sys:LOG_PATH}/propertieslogs.%i.log.gz
appender.<id1>.<id2>.type=PatternLayout
appender.<id1>.<id2>.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
appender.<id1>.<id3>.type=SizeBasedTriggeringPolicy
appender.<id1>.<id3>.size=1 KB
where <id1>, <id2> and <id3> are strings chosen by you. They have no influence on the configuration.
Solution 5:[5]
The below properties can be used to override the default configuration ( application.properties)
logging.logback.rollingpolicy.max-index=10
logging.logback.rollingpolicy.max-file-size=15MB
spring properties can be placed inside the log xml file.
<springProperty scope="context" name="MAX_INDEX" source="logging.logback.rollingpolicy.max-index"/>
<springProperty scope="context" name="MAX_FILE_SIZE" source="logging.logback.rollingpolicy.max-file-size"/>
sample:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<property name="LOG_FILE" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/e2e-tools.${nodename:-local}.log}"/>
<springProperty scope="context" name="MAX_INDEX" source="logging.logback.rollingpolicy.max-index"/>
<springProperty scope="context" name="MAX_FILE_SIZE" source="logging.logback.rollingpolicy.max-file-size" defaultValue="10MB"/>
<appender name="FIX_WINDOW_BASED_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_FILE}</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${LOG_FILE}.%i</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>${MAX_INDEX}</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
</triggeringPolicy>
<encoder>
<pattern>%date{ISO8601} [%thread] %level: %msg%n</pattern>
</encoder>
</appender>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%date{ISO8601} [%thread] %level: %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="FIX_WINDOW_BASED_FILE"/>
<appender-ref ref="CONSOLE"/>
</root>
</configuration>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gabriel G. |
| Solution 2 | |
| Solution 3 | sorin |
| Solution 4 | |
| Solution 5 | shashi singh |
